diff --git a/.github/workflows/clusterloader2-release.yml b/.github/workflows/clusterloader2-release.yml new file mode 100644 index 0000000000..5c131a8d54 --- /dev/null +++ b/.github/workflows/clusterloader2-release.yml @@ -0,0 +1,35 @@ +name: Build and Push Docker Image for clusterloader2 + +on: + push: + paths: + - "clusterloader2/**" + tags: + - "v*" + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push image + run: | + cd clusterloader2 + make build-image + make push-image + env: + IMAGE_REPO: ghcr.io/${{ github.repository_owner }} + IMAGE_TAG: ${{ github.ref_name }} diff --git a/clusterloader2/Makefile b/clusterloader2/Makefile index 7410a840bc..c6399f63f8 100644 --- a/clusterloader2/Makefile +++ b/clusterloader2/Makefile @@ -1,5 +1,6 @@ DOCKERFILE = Dockerfile IMAGE_REPO ?= localhost:5000 +IMAGE_REPO := $(shell echo $(IMAGE_REPO) | tr '[:upper:]' '[:lower:]') IMAGE_TAG ?= latest IMAGE_NAME = $(IMAGE_REPO)/clusterloader2:$(IMAGE_TAG)