Skip to content

Commit

Permalink
run version-check and build-prod when PR is tagged release-prep. al…
Browse files Browse the repository at this point in the history
…so build-prod on push
  • Loading branch information
cewert committed Dec 15, 2023
1 parent 664649f commit 713fb5b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 713fb5b

Please sign in to comment.