From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 27 Nov 2025 17:48:01 +0000 (-0500) Subject: Refactor normalize branch name X-Git-Tag: rec-5.4.0-beta1~45^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=378697328b1701cd782bdc0ba975a719c85cf453;p=thirdparty%2Fpdns.git Refactor normalize branch name Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- diff --git a/.github/actions/normalize-branch-name/action.yml b/.github/actions/normalize-branch-name/action.yml new file mode 100644 index 0000000000..6c1831d3ea --- /dev/null +++ b/.github/actions/normalize-branch-name/action.yml @@ -0,0 +1,11 @@ +name: 'Normalize branch name' +description: 'Normalize branch name' + +runs: + using: "composite" + steps: + - name: normalize branch name + shell: bash + run: | + : Normalize branch name + echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" diff --git a/.github/workflows/build-and-test-all.yml b/.github/workflows/build-and-test-all.yml index 82bce611ab..54a76b9dd8 100644 --- a/.github/workflows/build-and-test-all.yml +++ b/.github/workflows/build-and-test-all.yml @@ -114,10 +114,11 @@ jobs: fail-on-error: false - run: ${{ env.INV_CMD }} ci-auth-install ${{ matrix.builder == 'meson' && '--meson' || '' }} - run: ccache -s + - uses: ./.github/actions/normalize-branch-name + if: ${{ matrix.builder == 'meson' }} - name: Prepare binaries folder if: ${{ matrix.builder == 'meson' }} run: | - echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" mkdir -p /opt/pdns-auth/bin for i in $(find . -maxdepth 1 -type f -executable); do cp ${i} /opt/pdns-auth/bin/; done mkdir -p /opt/pdns-auth/sbin; mv /opt/pdns-auth/bin/pdns_server /opt/pdns-auth/sbin/ @@ -193,8 +194,8 @@ jobs: fail-on-error: false - run: ${{ env.INV_CMD }} ci-rec-install ${{ matrix.builder == 'meson' && '--meson' || '' }} - run: ccache -s - - if: ${{ matrix.builder == 'meson' }} - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name + if: ${{ matrix.builder == 'meson' }} - if: ${{ matrix.builder == 'meson' }} name: Store the binaries uses: actions/upload-artifact@v5 # this takes 30 seconds, maybe we want to tar @@ -288,10 +289,11 @@ jobs: fail-on-error: false - run: ${{ env.INV_CMD }} ci-dnsdist-install ${{ matrix.builder == 'meson' && '--meson' || '' }} - run: ccache -s + - uses: ./.github/actions/normalize-branch-name + if: ${{ matrix.builder == 'meson' }} - name: Prepare binaries folder if: ${{ matrix.builder == 'meson' }} run: | - echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" mkdir -p /opt/dnsdist/bin for i in $(find . -maxdepth 1 -type f -executable); do cp ${i} /opt/dnsdist/bin/; done - name: Store the binaries @@ -347,7 +349,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: @@ -480,7 +482,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: @@ -526,7 +528,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: @@ -577,7 +579,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: @@ -632,7 +634,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: @@ -688,7 +690,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: @@ -735,7 +737,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: @@ -796,7 +798,7 @@ jobs: submodules: recursive ref: ${{ inputs.branch-name }} persist-credentials: false - - run: echo "normalized-branch-name=$BRANCH_NAME" | tr "/" "-" >> "$GITHUB_ENV" + - uses: ./.github/actions/normalize-branch-name - name: Fetch the binaries uses: actions/download-artifact@v6 with: