Trigger Repo Update #51
Workflow file for this run
This file contains 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
name: Trigger Repo Update | |
on: | |
release: | |
types: [published, unpublished, created, edited, deleted] | |
repository_dispatch: | |
types: | |
- trigger-repo-update | |
workflow_dispatch: | |
env: | |
triggerUpdate: ${{ true }} | |
repoOwner: "Melioli" | |
repoName: "vpm" | |
repoBranch: "main" | |
workflowName: "build-listing.yml" | |
accessToken: ${{ secrets.MELIOLI_VPM }} | |
jobs: | |
dispatch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger Repo Update | |
if: ${{ env.triggerUpdate == 'true' }} | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ env.accessToken }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: '${{ env.repoOwner }}', | |
repo: '${{ env.repoName }}', | |
workflow_id: '${{ env.workflowName }}', | |
ref: '${{ env.repoBranch }}', | |
}) | |
# thanks to bd_ for this action: https://github.com/bdunderscore/modular-avatar/blob/main/.github/workflows/trigger-repo-rebuild.yml |