From d1c8fc7e618ce9d45d2a231d76ed90cd746b29a2 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 12 Mar 2024 12:44:43 -0700 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 3860c115c..61ffb56ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: GitHub CI on: pull_request: push: + workflow_dispatch: schedule: - cron: 0 0 * * 0 @@ -10,6 +11,13 @@ defaults: run: shell: 'bash -Eeuo pipefail -x {0}' +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: generate-jobs: @@ -24,8 +32,11 @@ jobs: name: Generate Jobs run: | strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" - 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