-
Notifications
You must be signed in to change notification settings - Fork 159
29 lines (27 loc) · 975 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
on:
repository_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
env:
GHAPI_URL: https://api.github.com/repos/linux-kernel-labs/linux/actions/runs/${{ github.event.client_payload.run_id }}/artifacts
run: |
export ZIP_URL=$(curl -u ${{ secrets.ACCESS_TOKEN }} $GHAPI_URL | jq -r .artifacts[0].archive_download_url)
curl -L -u ${{ secrets.ACCESS_TOKEN }} -o docs.zip $ZIP_URL
test -e docs.zip
- name: Publish
env:
DIR: ${{ github.event.client_payload.dir }}
run: |
rm -rf $DIR
mkdir -p $DIR
unzip -d $DIR docs.zip
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add $DIR
git commit --allow-empty -m "Publish $DIR"
git push