From 6473428e0eb5812db09d9ccbf363a003de8060bf Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Mon, 8 Jul 2024 13:48:40 -0400 Subject: [PATCH 1/4] Schedule the update-release-branch workflow --- .github/workflows/update-release-branch.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index ca69ea676f6..f2bf0d158cd 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -13,6 +13,9 @@ on: required: true type: boolean default: true + schedule: + - cron: "0 7 * * 1-5" # At 07:00 UTC (00:00 PST, 03:00 EST), Monday through Friday + concurrency: group: release-manual-${{ github.ref }} From f937a83994d7a80b7dd60b191035bdc5aa21eb02 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Mon, 8 Jul 2024 14:13:38 -0400 Subject: [PATCH 2/4] remove extra newline --- .github/workflows/update-release-branch.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index f2bf0d158cd..88826d37d9a 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -16,7 +16,6 @@ on: schedule: - cron: "0 7 * * 1-5" # At 07:00 UTC (00:00 PST, 03:00 EST), Monday through Friday - concurrency: group: release-manual-${{ github.ref }} cancel-in-progress: true From a013486dd6b2dfd7d8320bac029563806d4abdf2 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Tue, 9 Jul 2024 10:56:40 -0400 Subject: [PATCH 3/4] Set dry_run default to false, use `env` to ensure scheduled invocations also get this default --- .github/workflows/update-release-branch.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index 88826d37d9a..d1ef6bd5103 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -12,7 +12,7 @@ on: description: Dry runs will only attempt to merge but the result will not be pushed to the release branch required: true type: boolean - default: true + default: false schedule: - cron: "0 7 * * 1-5" # At 07:00 UTC (00:00 PST, 03:00 EST), Monday through Friday @@ -20,6 +20,9 @@ concurrency: group: release-manual-${{ github.ref }} cancel-in-progress: true +env: + dry_run: ${{ github.event.inputs.dry_run || 'false' } + jobs: update-release: runs-on: ubuntu-latest From 8183ca9a655fc52d5d98c30c29c61679260f0851 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Tue, 9 Jul 2024 10:58:35 -0400 Subject: [PATCH 4/4] Capitalize environment variable and use in workflow --- .github/workflows/update-release-branch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-release-branch.yml b/.github/workflows/update-release-branch.yml index d1ef6bd5103..7f859d954a2 100644 --- a/.github/workflows/update-release-branch.yml +++ b/.github/workflows/update-release-branch.yml @@ -21,7 +21,7 @@ concurrency: cancel-in-progress: true env: - dry_run: ${{ github.event.inputs.dry_run || 'false' } + DRY_RUN: ${{ github.event.inputs.dry_run || 'false' } jobs: update-release: @@ -94,7 +94,7 @@ jobs: message=${input_message:-"Merging main into release"} echo "message=$message" git merge -m "$message" main; - if [ "${{ inputs.dry_run }}" == "true" ]; then + if [ "${{ env.DRY_RUN }}" == "true" ]; then echo "dry run, skipping push to remote"; git log -n 10 --oneline; else