Skip to content

Commit

Permalink
DROP: Rework Docker Build Action
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Aug 7, 2024
1 parent f801b48 commit 572e17d
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}

Expand All @@ -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

0 comments on commit 572e17d

Please sign in to comment.