GitHub: Dispatch the diff-link updater immediately after the weekly release is created
This commit is contained in:
committed by
Kacper Donat
parent
78b017130a
commit
ea2c1b0c75
25
.github/workflows/build_release.yml
vendored
25
.github/workflows/build_release.yml
vendored
@@ -8,6 +8,7 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
jobs:
|
||||
upload_src:
|
||||
@@ -43,6 +44,30 @@ jobs:
|
||||
echo "BUILD_TAG=${BUILD_TAG}" >> "$GITHUB_ENV"
|
||||
echo "build_tag=${BUILD_TAG}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Trigger notes updater workflow (only for weekly)
|
||||
if: startsWith(steps.get_tag.outputs.build_tag, 'weekly-')
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
WEEKLY_TAG: ${{ steps.get_tag.outputs.build_tag }}
|
||||
with:
|
||||
script: |
|
||||
const owner = context.repo.owner;
|
||||
const repo = context.repo.repo;
|
||||
|
||||
// Reusable/dispatchable updater workflow file in .github/workflows/
|
||||
const workflow_id = 'weekly-compare-link.yml';
|
||||
|
||||
// Use the default branch so the workflow file is available
|
||||
const ref = (context.payload?.repository?.default_branch) || 'main';
|
||||
const current_tag = process.env.WEEKLY_TAG || '';
|
||||
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner, repo, workflow_id, ref,
|
||||
inputs: { current_tag }
|
||||
});
|
||||
|
||||
core.info(`Dispatched ${workflow_id} on ${ref} with current_tag='${current_tag}'.`)
|
||||
|
||||
- name: Upload Source
|
||||
id: upload_source
|
||||
shell: bash -l {0}
|
||||
|
||||
Reference in New Issue
Block a user