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