From 713fb5b2a59b9df730dfd228bff01d6bf95503d9 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Fri, 15 Dec 2023 00:50:45 -0500 Subject: [PATCH] run version-check and build-prod when PR is tagged `release-prep`. also build-prod on push --- .github/workflows/build-prod.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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