Skip to content

Polish CI pipelines for building/testing and testing environments (#19) #5

Polish CI pipelines for building/testing and testing environments (#19)

Polish CI pipelines for building/testing and testing environments (#19) #5

Workflow file for this run

name: Eval Nginx Load Balancer - Build Docker image and publish to GitHub Packages
on:
push:
tags:
- "v*.*.*"
# branches:
# - develop
paths:
- "anubis-eval/eval-lb/**"
- ".github/workflows/eval-lb.yaml"
# pull_request:
# branches:
# - develop
#
# paths:
# - "anubis-eval/eval-lb/**"
# - ".github/workflows/eval-lb.yaml"
env:
REGISTRY: ghcr.io
IMAGE_NAME: asgard-eval-lb
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: anubis-eval/eval-lb
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}