mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
[publish] Trigger update workflow on "api" repo after Publish (#9791)
So that we don't need to trigger it manually and/or wait for the cronjob.
This commit is contained in:
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@@ -65,3 +65,11 @@ jobs:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
|
||||
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }}
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||
- name: Trigger Update
|
||||
if: ${{ steps.check-release.outputs.IS_RELEASE == 'true' }}
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
script: |
|
||||
const script = require('./utils/trigger-update-workflow.js')
|
||||
await script({ github, context })
|
||||
|
||||
8
utils/trigger-update-workflow.js
vendored
Normal file
8
utils/trigger-update-workflow.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = async ({ github, context }) => {
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: context.repo.owner,
|
||||
repo: 'api',
|
||||
workflow_id: 'cron-update-build-container.yml',
|
||||
ref: 'main',
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user