-
Notifications
You must be signed in to change notification settings - Fork 18
Sync Dependabot action pin comments via reusable workflow #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+52
−2
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1a1904c
ci: sync Dependabot action pin comments via reusable workflow
jeremy 7c44507
ci: filter workflow_run to dependabot branches; give test.yml a uniqu…
jeremy 8108703
deps: require Go 1.26.2
jeremy a0140f7
ci: re-pin dependabot-sync reusable workflow past the dispatch fallback
jeremy 46eb9e4
deps: require Go 1.26.5
jeremy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Sync Dependabot action pin comments | ||
|
|
||
| # Thin caller: all logic lives in basecamp/.github's reusable workflow — | ||
| # trusted default-branch code that fetches the Dependabot head branch as data | ||
| # only, rewrites stale `# vX.Y.Z` pin comments, and pushes back behind a | ||
| # compare-and-swap lease using the write deploy key scoped to this repo's | ||
| # dependabot-sync environment. | ||
|
|
||
| on: | ||
| workflow_run: # zizmor: ignore[dangerous-triggers] -- only the SHA-pinned reusable workflow (reviewed default-branch code) executes; the Dependabot head branch is fetched as data, never executed | ||
| workflows: [Test] | ||
| types: [completed] | ||
| branches: ["dependabot/github_actions/**"] | ||
| workflow_dispatch: | ||
| inputs: | ||
| branch: | ||
| description: Dependabot branch to sync (dependabot/github_actions/...) | ||
| required: true | ||
| type: string | ||
| e2e: | ||
| description: "E2E proof mode: expect a draft PR authored by the dispatcher on a dependabot/github_actions/e2e-proof-* branch" | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| sync: | ||
| # Defense-in-depth behind the trigger-level branches filter (which stops | ||
| # runs from being created for other branches at all); the reusable | ||
| # workflow re-checks this and everything else. | ||
| if: >- | ||
| github.event_name == 'workflow_dispatch' || | ||
| startsWith(github.event.workflow_run.head_branch, 'dependabot/github_actions/') | ||
| uses: basecamp/.github/.github/workflows/dependabot-sync-actions-comments.yml@9ca40e3b2d6be769b370b7cee86e8448267c95d8 | ||
| with: | ||
| ci-workflow-name: Test | ||
| branch: ${{ inputs.branch || '' }} | ||
| e2e: ${{ inputs.e2e || false }} | ||
|
jeremy marked this conversation as resolved.
|
||
| permissions: | ||
| contents: read | ||
| actions: write | ||
| pull-requests: read | ||
| # The deploy key is scoped to this repo's dependabot-sync environment | ||
| # (deployment branches: default branch only); environment secrets cannot | ||
| # be forwarded explicitly to a reusable workflow, so inherit is required. | ||
| secrets: inherit # zizmor: ignore[secrets-inherit] -- see above; the called workflow is SHA-pinned and reads only SYNC_ACTIONS_DEPLOY_KEY, gated by the dependabot-sync environment | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| name: Security | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| workflow_call: | ||
| push: | ||
| branches: [main] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| name: CI | ||
| name: Test | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.