Skip to content

Commit bfcd43f

Browse files
feat(ci): trigger artifact mirror to OSP/OOC on release
1 parent 4358653 commit bfcd43f

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Trigger Artifact Mirror
2+
3+
# When a release is published in this repo, trigger the mirror-artifacts
4+
# workflow in fork-sync-all so OSP and OOC get the release immediately.
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
trigger:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
steps:
18+
- name: Dispatch mirror-artifacts in fork-sync-all
19+
env:
20+
GH_TOKEN: ${{ secrets.SYNC_TOKEN }}
21+
run: |
22+
curl --disable --silent --fail -X POST \
23+
-H "Authorization: token ${GH_TOKEN}" \
24+
-H "Accept: application/vnd.github+json" \
25+
-H "Content-Type: application/json" \
26+
"https://api.github.com/repos/Interested-Deving-1896/fork-sync-all/actions/workflows/mirror-artifacts.yml/dispatches" \
27+
-d "{
28+
\"ref\": \"main\",
29+
\"inputs\": {
30+
\"upstream_repo\": \"${{ github.event.repository.name }}\",
31+
\"release_tag\": \"${{ github.event.release.tag_name }}\"
32+
}
33+
}"
34+
echo "Dispatched mirror-artifacts for ${{ github.event.repository.name }}@${{ github.event.release.tag_name }}"

0 commit comments

Comments
 (0)