File tree Expand file tree Collapse file tree 1 file changed +12
-22
lines changed Expand file tree Collapse file tree 1 file changed +12
-22
lines changed Original file line number Diff line number Diff line change @@ -60,28 +60,18 @@ jobs:
6060 push-version :
6161 needs : build-and-release
6262 runs-on : ubuntu-latest
63- if : startsWith( github.ref, 'refs/tags/')
63+ if : github.ref_type == 'tag'
6464 permissions :
65- contents : write
65+ actions : write
66+ env :
67+ GITHUB_TOKEN : ${{ secrets.TARGET_REPO_TOKEN }}
6668 steps :
67- - name : Checkout target repo
68- run : |
69- git clone https://$GITHUB_USER:[email protected] /sev-2/docs.git docs 70-
71- - name : Write JSON file
69+ - name : Dispatch the action to "sev-2/docs"
7270 run : |
73- echo "{\"version\": \"$GITHUB_REF_NAME\"}" > docs/public/latest.json
74-
75- - name : Commit and push changes
76- run : |
77- cd docs
78- git config --global user.name "raiden-ci"
79- git config --global user.email "[email protected] " 80- git remote set-url origin https://$GITHUB_USER:[email protected] /sev-2/docs.git 81- git add .
82- git commit -m "Update to version $GITHUB_REF_NAME"
83- git push
84-
85- env :
86- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
87- GITHUB_USER : ${{ secrets.TARGET_USERNAME }}
71+ curl -X POST \
72+ -H "Accept: application/vnd.github+json" \
73+ -H "Authorization: Bearer $GITHUB_TOKEN" \
74+ -H "X-GitHub-Api-Version: 2022-11-28" \
75+ -H "Content-Type: application/json" \
76+ --data '{"event_type": "update-repo", "client_payload": {"RAIDEN_VERSION": "$GITHUB_REF_NAME"}}' \
77+ https://api.github.com/repos/sev-2/docs/dispatches
You can’t perform that action at this time.
0 commit comments