From 2bee511641696a53db250e236f372e78e802d001 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 18 Dec 2023 16:21:53 -0800 Subject: [PATCH] Update GHA YAML with bashbrew example improvements (esp. concurrency:) --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7402fe5..00f76bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: push: branches: - master + workflow_dispatch: schedule: - cron: 0 0 * * 0 @@ -12,6 +13,13 @@ defaults: run: shell: 'bash -Eeuo pipefail -x {0}' +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: generate-jobs: @@ -28,8 +36,11 @@ jobs: 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-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: needs: generate-jobs