From b6b35d90db6499a2ef7f4b126dd84217d3440efd Mon Sep 17 00:00:00 2001 From: Peter Schiffer <3899107+pschiffe@users.noreply.github.com> Date: Fri, 25 Mar 2022 17:51:40 +0100 Subject: [PATCH] Simplify workflows for tagged images --- .../docker-image-tag-pdns-alpine-44.yml | 39 ------------------- ...5.yml => docker-image-tag-pdns-alpine.yml} | 10 +++-- .../docker-image-tag-pdns-fedora-44.yml | 39 ------------------- ...5.yml => docker-image-tag-pdns-fedora.yml} | 10 +++-- .../docker-image-tag-recursor-alpine-44.yml | 39 ------------------- ...l => docker-image-tag-recursor-alpine.yml} | 10 +++-- .../docker-image-tag-recursor-fedora-44.yml | 39 ------------------- ...l => docker-image-tag-recursor-fedora.yml} | 10 +++-- 8 files changed, 28 insertions(+), 168 deletions(-) delete mode 100644 .github/workflows/docker-image-tag-pdns-alpine-44.yml rename .github/workflows/{docker-image-tag-pdns-alpine-45.yml => docker-image-tag-pdns-alpine.yml} (74%) delete mode 100644 .github/workflows/docker-image-tag-pdns-fedora-44.yml rename .github/workflows/{docker-image-tag-pdns-fedora-45.yml => docker-image-tag-pdns-fedora.yml} (74%) delete mode 100644 .github/workflows/docker-image-tag-recursor-alpine-44.yml rename .github/workflows/{docker-image-tag-recursor-alpine-45.yml => docker-image-tag-recursor-alpine.yml} (79%) delete mode 100644 .github/workflows/docker-image-tag-recursor-fedora-44.yml rename .github/workflows/{docker-image-tag-recursor-fedora-45.yml => docker-image-tag-recursor-fedora.yml} (80%) diff --git a/.github/workflows/docker-image-tag-pdns-alpine-44.yml b/.github/workflows/docker-image-tag-pdns-alpine-44.yml deleted file mode 100644 index 01ab623..0000000 --- a/.github/workflows/docker-image-tag-pdns-alpine-44.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Docker Image CI pdns-mysql 4.4 alpine - -on: - push: - tags: [ 'pdns-mysql-alpine-4.4' ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - - name: Check Out Repo - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build and push PDNS - id: docker_build_pdns - uses: docker/build-push-action@v2 - with: - context: ./pdns - file: ./pdns/Dockerfile.alpine - builder: ${{ steps.buildx.outputs.name }} - push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-mysql:4.4-alpine - - - name: Image digest - run: echo ${{ steps.docker_build_pdns.outputs.digest }} diff --git a/.github/workflows/docker-image-tag-pdns-alpine-45.yml b/.github/workflows/docker-image-tag-pdns-alpine.yml similarity index 74% rename from .github/workflows/docker-image-tag-pdns-alpine-45.yml rename to .github/workflows/docker-image-tag-pdns-alpine.yml index 58c81e0..1e7d647 100644 --- a/.github/workflows/docker-image-tag-pdns-alpine-45.yml +++ b/.github/workflows/docker-image-tag-pdns-alpine.yml @@ -1,9 +1,9 @@ -name: Docker Image CI pdns-mysql 4.5 alpine +name: Docker Image CI pdns-mysql alpine on: push: tags: - - 'pdns-mysql-alpine-4.5' + - 'pdns-mysql-alpine-*' jobs: @@ -26,6 +26,10 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Set output + id: vars + run: echo ::set-output name=version::${GITHUB_REF##*-} + - name: Build and push PDNS id: docker_build_pdns uses: docker/build-push-action@v2 @@ -34,7 +38,7 @@ jobs: file: ./pdns/Dockerfile.alpine builder: ${{ steps.buildx.outputs.name }} push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-mysql:4.5-alpine + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-mysql:${{ steps.vars.outputs.version }}-alpine - name: Image digest run: echo ${{ steps.docker_build_pdns.outputs.digest }} diff --git a/.github/workflows/docker-image-tag-pdns-fedora-44.yml b/.github/workflows/docker-image-tag-pdns-fedora-44.yml deleted file mode 100644 index 1ace1fc..0000000 --- a/.github/workflows/docker-image-tag-pdns-fedora-44.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Docker Image CI pdns-mysql 4.4 latest - -on: - push: - tags: [ 'pdns-mysql-fedora-4.4' ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - - name: Check Out Repo - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build and push PDNS - id: docker_build_pdns - uses: docker/build-push-action@v2 - with: - context: ./pdns - file: ./pdns/Dockerfile - builder: ${{ steps.buildx.outputs.name }} - push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-mysql:4.4 - - - name: Image digest - run: echo ${{ steps.docker_build_pdns.outputs.digest }} diff --git a/.github/workflows/docker-image-tag-pdns-fedora-45.yml b/.github/workflows/docker-image-tag-pdns-fedora.yml similarity index 74% rename from .github/workflows/docker-image-tag-pdns-fedora-45.yml rename to .github/workflows/docker-image-tag-pdns-fedora.yml index d6358ed..21c03fb 100644 --- a/.github/workflows/docker-image-tag-pdns-fedora-45.yml +++ b/.github/workflows/docker-image-tag-pdns-fedora.yml @@ -1,9 +1,9 @@ -name: Docker Image CI pdns-mysql 4.5 latest +name: Docker Image CI pdns-mysql fedora on: push: tags: - - 'pdns-mysql-fedora-4.5' + - 'pdns-mysql-fedora-*' jobs: @@ -26,6 +26,10 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Set output + id: vars + run: echo ::set-output name=version::${GITHUB_REF##*-} + - name: Build and push PDNS id: docker_build_pdns uses: docker/build-push-action@v2 @@ -34,7 +38,7 @@ jobs: file: ./pdns/Dockerfile builder: ${{ steps.buildx.outputs.name }} push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-mysql:4.5 + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-mysql:${{ steps.vars.outputs.version }} - name: Image digest run: echo ${{ steps.docker_build_pdns.outputs.digest }} diff --git a/.github/workflows/docker-image-tag-recursor-alpine-44.yml b/.github/workflows/docker-image-tag-recursor-alpine-44.yml deleted file mode 100644 index 32977c3..0000000 --- a/.github/workflows/docker-image-tag-recursor-alpine-44.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Docker Image CI pdns-recursor 4.4 alpine - -on: - push: - tags: [ 'pdns-recursor-alpine-4.4' ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - - name: Check Out Repo - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build and push PDNS Recursor - id: docker_build_recursor - uses: docker/build-push-action@v2 - with: - context: ./pdns-recursor - file: ./pdns-recursor/Dockerfile.alpine - builder: ${{ steps.buildx.outputs.name }} - push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:4.4-alpine - - - name: Image digest - run: echo ${{ steps.docker_build_recursor.outputs.digest }} diff --git a/.github/workflows/docker-image-tag-recursor-alpine-45.yml b/.github/workflows/docker-image-tag-recursor-alpine.yml similarity index 79% rename from .github/workflows/docker-image-tag-recursor-alpine-45.yml rename to .github/workflows/docker-image-tag-recursor-alpine.yml index 9f7f5b7..e995cf2 100644 --- a/.github/workflows/docker-image-tag-recursor-alpine-45.yml +++ b/.github/workflows/docker-image-tag-recursor-alpine.yml @@ -1,9 +1,9 @@ -name: Docker Image CI pdns-recursor 4.5 alpine +name: Docker Image CI pdns-recursor alpine on: push: tags: - - 'pdns-recursor-alpine-4.5' + - 'pdns-recursor-alpine-*' jobs: @@ -26,6 +26,10 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Set output + id: vars + run: echo ::set-output name=version::${GITHUB_REF##*-} + - name: Build and push PDNS Recursor id: docker_build_recursor uses: docker/build-push-action@v2 @@ -34,7 +38,7 @@ jobs: file: ./pdns-recursor/Dockerfile.alpine builder: ${{ steps.buildx.outputs.name }} push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:4.5-alpine + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:${{ steps.vars.outputs.version }}-alpine - name: Image digest run: echo ${{ steps.docker_build_recursor.outputs.digest }} diff --git a/.github/workflows/docker-image-tag-recursor-fedora-44.yml b/.github/workflows/docker-image-tag-recursor-fedora-44.yml deleted file mode 100644 index 4ab0291..0000000 --- a/.github/workflows/docker-image-tag-recursor-fedora-44.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Docker Image CI pdns-recursor 4.4 latest - -on: - push: - tags: [ 'pdns-recursor-fedora-4.4' ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - - name: Check Out Repo - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build and push PDNS Recursor - id: docker_build_recursor - uses: docker/build-push-action@v2 - with: - context: ./pdns-recursor - file: ./pdns-recursor/Dockerfile - builder: ${{ steps.buildx.outputs.name }} - push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:4.4 - - - name: Image digest - run: echo ${{ steps.docker_build_recursor.outputs.digest }} diff --git a/.github/workflows/docker-image-tag-recursor-fedora-45.yml b/.github/workflows/docker-image-tag-recursor-fedora.yml similarity index 80% rename from .github/workflows/docker-image-tag-recursor-fedora-45.yml rename to .github/workflows/docker-image-tag-recursor-fedora.yml index e19577f..8caabcc 100644 --- a/.github/workflows/docker-image-tag-recursor-fedora-45.yml +++ b/.github/workflows/docker-image-tag-recursor-fedora.yml @@ -1,9 +1,9 @@ -name: Docker Image CI pdns-recursor 4.5 latest +name: Docker Image CI pdns-recursor fedora on: push: tags: - - 'pdns-recursor-fedora-4.5' + - 'pdns-recursor-fedora-*' jobs: @@ -26,6 +26,10 @@ jobs: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Set output + id: vars + run: echo ::set-output name=version::${GITHUB_REF##*-} + - name: Build and push PDNS Recursor id: docker_build_recursor uses: docker/build-push-action@v2 @@ -34,7 +38,7 @@ jobs: file: ./pdns-recursor/Dockerfile builder: ${{ steps.buildx.outputs.name }} push: true - tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:4.5 + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/pdns-recursor:${{ steps.vars.outputs.version }} - name: Image digest run: echo ${{ steps.docker_build_recursor.outputs.digest }}