My-tmp-workflow #17
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: | | |
echo "Triggering sync workflow" | |
echo "Using URL: https://api.github.com/repos/$REMOTE_OWNER/$REMOTE_REPO/actions/workflows/vyos-repo-sync.yml/dispatches" | |
curl -L -X POST \ | |
-H "Accept: application/vnd.github.everest-preview+json" \ | |
-H "Authorization: Bearer $MY_PAT" \ | |
https://api.github.com/repos/$REMOTE_OWNER/$REMOTE_REPO/actions/workflows/vyos-repo-sync.yml/dispatches \ | |
-d '{"ref":"git-actions"}' |