Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
permissions:
contents: write
pull-requests: write
uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release-prepare.yml@68068d2b847ff8c870c0cea4b31ec9f16452a573 # v3
uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release-prepare.yml@d7dad49d7e0f147d484a05d1049354406169fd97 # v3
with:
plugin-name: podnotes
package-manager: npm
Expand All @@ -50,7 +50,7 @@ jobs:
target-sha: ${{ github.event.workflow_run.head_sha || inputs.targetSha }}
release-bot-app-slug: podnotes-release-bot
app-id: ${{ vars.RELEASE_APP_ID }}
workflows-ref: 68068d2b847ff8c870c0cea4b31ec9f16452a573 # v3
workflows-ref: d7dad49d7e0f147d484a05d1049354406169fd97 # v3
# dry-run: true # plan only; skip opening the PR (smoke test)
secrets:
release-app-private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
19 changes: 15 additions & 4 deletions .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ name: Trigger release
on:
pull_request_target:
types: [closed]
# Recovery path: re-run forensic validation for an already-merged release PR
# (e.g. after a toolkit pin bump fixes a validation bug). The reusable
# workflow re-derives everything from the PR number and fails closed, so a
# bad number cannot dispatch a release.
workflow_dispatch:
inputs:
pr-number:
description: "Merged release PR number to re-validate"
required: true
type: string

permissions: {}

Expand All @@ -22,16 +32,17 @@ concurrency:
jobs:
validate:
if: >-
github.event.pull_request.merged == true &&
github.event_name == 'workflow_dispatch' ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow recovery dispatch to satisfy validate SHA check

When this manual path is used to recover an already-merged release PR after a workflow fix, the run starts from the selected workflow ref (normally the new master HEAD containing this change). The pinned release-validate.yml@d7dad49... workflow still receives EVENT_SHA=${{ github.sha }} and rejects the run unless it exactly equals that PR's merge_commit_sha; because this workflow_dispatch addition must land after the failed release merge, master HEAD cannot be the old release PR merge commit. As a result, the documented gh workflow run release-trigger.yml -f pr-number=291 recovery path fails before it can dispatch the release.

Useful? React with 👍 / 👎.

(github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'master' &&
startsWith(github.event.pull_request.head.ref, 'release/')
startsWith(github.event.pull_request.head.ref, 'release/'))
permissions:
actions: write
contents: write
pull-requests: read
uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release-validate.yml@68068d2b847ff8c870c0cea4b31ec9f16452a573 # v3
uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release-validate.yml@d7dad49d7e0f147d484a05d1049354406169fd97 # v3
with:
pr-number: ${{ github.event.pull_request.number }}
pr-number: ${{ github.event.pull_request.number || inputs.pr-number }}
plugin-name: podnotes
package-manager: npm
default-branch: master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
contents: write
id-token: write
pull-requests: read
uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release.yml@68068d2b847ff8c870c0cea4b31ec9f16452a573 # v3
uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release.yml@d7dad49d7e0f147d484a05d1049354406169fd97 # v3
with:
release-pr: ${{ inputs.releasePr }}
plugin-name: podnotes
Expand All @@ -48,7 +48,7 @@ jobs:
setup-python: true
python-version: "3.x"
docs-requirements: docs/requirements.txt
workflows-ref: 68068d2b847ff8c870c0cea4b31ec9f16452a573 # v3
workflows-ref: d7dad49d7e0f147d484a05d1049354406169fd97 # v3
secrets:
# Optional: unset secrets resolve to '' and the notify job skips them.
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
Expand Down