diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index 096a6a5cf..0d9b4f050 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -2,20 +2,22 @@ name: build-prod on: pull_request: - branches: - - master + types: [labeled, opened, synchronize, reopened] push: branches: - master + - "*.*.z" jobs: version-check: + if: ${{ contains(github.event.pull_request.labels.*.name, 'release-prep') runs-on: ubuntu-latest steps: + # checkout the branch that triggered the workflow - name: Checkout master (the latest release) uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 with: - ref: master + ref: ${GITHUB_REF##*/} # this only works with branches that don't include / - name: Install jq to parse json uses: awalsh128/cache-apt-pkgs-action@latest with: @@ -59,6 +61,7 @@ jobs: if: (env.newManVersion != env.newPackVersion) || (env.newManVersion != env.newMakeVersion) run: exit 1 prod: + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release-prep') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4