My-tmp-workflow #14
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: My-tmp-workflow | |
on: | |
# push: | |
# branches: | |
# - main | |
workflow_dispatch: | |
jobs: | |
trigger-sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print secrets | |
shell: bash | |
env: | |
MY_REMOTE_REPO: ${{ secrets.REMOTE_REPO }} | |
MY_REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }} | |
run: | | |
echo "01 secret remote repo $MY_REMOTE_REPO for $MY_REMOTE_OWNER" | |
echo "02 secret remote repo $REMOTE_REPO for $REMOTE_OWNER" | |
- name: Trigger sync workflow | |
shell: bash | |
env: | |
MY_REMOTE_REPO: ${{ secrets.REMOTE_REPO }} | |
MY_REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }} | |
MY_PAT: ${{ secrets.PAT }} | |
run: | | |
curl -X POST \ | |
-H "Accept: application/vnd.github.everest-preview+json" \ | |
-H "Authorization: token $MY_PAT" \ | |
https://api.github.com/repos/$REMOTE_OWNER/$REMOTE_REPO/actions/workflows/vyos-repo-sync.yml/dispatches \ | |
-d '{"event_type":"sync-request"}' |