From 572e17dea9a18ace308b151dae0f6e9f99181d33 Mon Sep 17 00:00:00 2001 From: Robert Volkmann Date: Wed, 7 Aug 2024 09:29:23 +0200 Subject: [PATCH] DROP: Rework Docker Build Action --- .github/workflows/docker.yaml | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index fe739201..2b5ee87c 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -1,19 +1,7 @@ --- name: Docker Build Action on: - pull_request: - branches: - - master - release: - types: - - published push: - branches: - - master - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} jobs: build: @@ -24,7 +12,7 @@ jobs: - name: Log in to the container registry uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} + registry: ghcr.io username: ${{ secrets.DOCKER_REGISTRY_USER }} password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} @@ -33,15 +21,9 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - - name: Make tag - run: | - [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true - [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true - [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true - - name: Build and push image uses: docker/build-push-action@v5 with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.tag }} + tags: ghcr.io/metal-stack/external-dns-management:powerdns