Skip to content

Commit 7c6534a

Browse files
vaindclaude
andcommitted
Update updater workflow to use GITHUB_WORKFLOW_REF
Remove _workflow_version input parameter and automatically determine the workflow reference from GITHUB_WORKFLOW_REF instead. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 33fcf3c commit 7c6534a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

.github/workflows/updater.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ on:
3838
type: string
3939
required: false
4040
default: create
41-
_workflow_version:
42-
description: 'Internal: specify github-workflows (this repo) revision to use when checking out scripts.'
43-
type: string
44-
required: false
45-
default: v2 # Note: update when publishing a new version
4641
secrets:
4742
api-token:
4843
required: true
@@ -141,11 +136,13 @@ jobs:
141136
# Note: cannot use `actions/checkout` at the moment because you can't clone outside of the repo root.
142137
# Follow https://github.com/actions/checkout/issues/197
143138
run: |
139+
# Extract the ref from GITHUB_WORKFLOW_REF (e.g., getsentry/github-workflows/.github/workflows/updater.yml@refs/pull/109/merge -> refs/pull/109/merge)
140+
WORKFLOW_REF=$(echo "${{ github.workflow_ref }}" | sed 's/.*@//')
144141
mkdir -p ${{ runner.temp }}/ghwf
145142
cd ${{ runner.temp }}/ghwf
146143
git init
147144
git remote add origin https://github.com/getsentry/github-workflows.git
148-
git fetch --depth 1 origin ${{ inputs._workflow_version }}
145+
git fetch --depth 1 origin ${WORKFLOW_REF}
149146
git checkout FETCH_HEAD
150147
151148
- name: Update to the latest version

.github/workflows/workflow-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
name: WORKFLOW-TEST-DEPENDENCY-DO-NOT-MERGE
1313
pattern: '^2\.0\.'
1414
pr-strategy: update
15-
_workflow_version: ${{ github.sha }}
1615
secrets:
1716
api-token: ${{ github.token }}
1817

@@ -23,7 +22,6 @@ jobs:
2322
name: Workflow args test script
2423
runs-on: macos-latest
2524
pattern: '.*'
26-
_workflow_version: ${{ github.sha }}
2725
secrets:
2826
api-token: ${{ github.token }}
2927

0 commit comments

Comments
 (0)