Merge pull request #16964 from rgacogne/ddist21-backport-16939 #91
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Build images for tags | |
| on: | |
| push: | |
| tags: | |
| - 'auth-*' | |
| - 'dnsdist-*' | |
| - 'rec-*' | |
| # Please be aware that this version of the workflow is NOT the one called | |
| # when someone pushes a tag on a release branch (rel/**)! The version | |
| # used is the one present in the tag, which in turns should call the | |
| # version present in the master branch of the reusable workflow defined | |
| # in .github/workflows/build-docker-images.yml | |
| # This means that any change to this file will very likely need to be | |
| # backported to all release branches!! | |
| permissions: | |
| actions: read | |
| contents: read | |
| # This is used to complete the identity challenge | |
| # with sigstore/fulcio when running outside of PRs. | |
| id-token: write | |
| jobs: | |
| prepare: | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| image-name-suffix: ${{ steps.get-image-version.outputs.version }} | |
| image-tag: ${{ steps.get-image-tag.outputs.tag }} | |
| image-description-suffix: ${{ steps.get-image-description.outputs.description }} | |
| steps: | |
| - run: echo "version=$(echo "${REF_NAME}" | cut -d '-' -f 2 | awk -F'.' '{print $1$2}')" >> $GITHUB_OUTPUT | |
| id: get-image-version | |
| - run: echo "tag=$(echo "${REF_NAME}" | cut -d '-' -f 2-)" >> $GITHUB_OUTPUT | |
| id: get-image-tag | |
| - run: echo "description=$(echo "${REF_NAME}" | cut -d '-' -f 2- | awk -F'.' '{print "v"$1"."$2".x"}')" >> $GITHUB_OUTPUT | |
| id: get-image-description | |
| call-build-image-auth: | |
| uses: PowerDNS/pdns/.github/workflows/build-docker-images.yml@master | |
| if: startsWith(github.ref_name, 'auth') | |
| needs: prepare | |
| with: | |
| product: auth | |
| ref: ${{ github.ref_name }} | |
| image-name: pdns-auth-${{ needs.prepare.outputs.image-name-suffix }} | |
| image-tags: |- | |
| latest | |
| ${{ needs.prepare.outputs.image-tag }} | |
| image-description: 'PowerDNS Authoritative Server ${{ needs.prepare.outputs.image-description-suffix }}' | |
| platforms: linux/amd64,linux/arm64/v8 | |
| build-args: |- | |
| DOCKER_FAKE_RELEASE=YES | |
| push: true | |
| secrets: | |
| DOCKERHUB_ORGANIZATION_NAME: ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }} | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| call-build-image-recursor: | |
| uses: PowerDNS/pdns/.github/workflows/build-docker-images.yml@master | |
| if: startsWith(github.ref_name, 'rec') | |
| needs: prepare | |
| with: | |
| product: recursor | |
| ref: ${{ github.ref_name }} | |
| image-name: pdns-recursor-${{ needs.prepare.outputs.image-name-suffix }} | |
| image-tags: |- | |
| latest | |
| ${{ needs.prepare.outputs.image-tag }} | |
| image-description: 'PowerDNS Recursor ${{ needs.prepare.outputs.image-description-suffix }}' | |
| platforms: linux/amd64,linux/arm64/v8 | |
| build-args: |- | |
| DOCKER_FAKE_RELEASE=YES | |
| push: true | |
| secrets: | |
| DOCKERHUB_ORGANIZATION_NAME: ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }} | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| call-build-image-dnsdist: | |
| uses: PowerDNS/pdns/.github/workflows/build-docker-images.yml@master | |
| if: startsWith(github.ref_name, 'dnsdist') | |
| needs: prepare | |
| with: | |
| product: dnsdist | |
| ref: ${{ github.ref_name }} | |
| image-name: dnsdist-${{ needs.prepare.outputs.image-name-suffix }} | |
| image-tags: |- | |
| latest | |
| ${{ needs.prepare.outputs.image-tag }} | |
| image-description: 'PowerDNS DNSdist ${{ needs.prepare.outputs.image-description-suffix }}' | |
| platforms: linux/amd64,linux/arm64/v8 | |
| build-args: |- | |
| DOCKER_FAKE_RELEASE=YES | |
| push: true | |
| secrets: | |
| DOCKERHUB_ORGANIZATION_NAME: ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }} | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} |