Update GHA YAML with bashbrew example improvements (esp. concurrency:)

This commit is contained in:
Tianon Gravi 2023-12-18 16:21:53 -08:00
parent c82d1f70ee
commit 2bee511641
1 changed files with 13 additions and 2 deletions

View File

@ -5,6 +5,7 @@ on:
push: push:
branches: branches:
- master - master
workflow_dispatch:
schedule: schedule:
- cron: 0 0 * * 0 - cron: 0 0 * * 0
@ -12,6 +13,13 @@ defaults:
run: run:
shell: 'bash -Eeuo pipefail -x {0}' shell: 'bash -Eeuo pipefail -x {0}'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs: jobs:
generate-jobs: generate-jobs:
@ -28,8 +36,11 @@ jobs:
strategy="$(GENERATE_STACKBREW_LIBRARY='.github/workflows/fake-gsl.sh' "$BASHBREW_SCRIPTS/github-actions/generate.sh")" strategy="$(GENERATE_STACKBREW_LIBRARY='.github/workflows/fake-gsl.sh' "$BASHBREW_SCRIPTS/github-actions/generate.sh")"
strategy="$(.github/workflows/munge-build.sh -c <<<"$strategy")" strategy="$(.github/workflows/munge-build.sh -c <<<"$strategy")"
strategy="$(.github/workflows/munge-debian-unstable.sh -c <<<"$strategy")" strategy="$(.github/workflows/munge-debian-unstable.sh -c <<<"$strategy")"
echo "strategy=$strategy" >> "$GITHUB_OUTPUT"
jq . <<<"$strategy" # sanity check / debugging aid EOF="EOF-$RANDOM-$RANDOM-$RANDOM"
echo "strategy<<$EOF" >> "$GITHUB_OUTPUT"
jq <<<"$strategy" . | tee -a "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
test: test:
needs: generate-jobs needs: generate-jobs