-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.76 KB
/
fetch_includes.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
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Fetch Remote Assets
on: workflow_dispatch
# permissions:
# contents: write
env:
MODULES_LIST_URL: "https://raw.githubusercontent.com/nesi/modules-list/main/module-list.json"
GLOSSARY_URL: "https://raw.githubusercontent.com/nesi/nesi-wordlist/main/outputs/glossary.md"
DICTIONARY_URL: "https://raw.githubusercontent.com/nesi/nesi-wordlist/main/outputs/dictionary.txt"
SNIPPETS_URL: "https://raw.githubusercontent.com/nesi/nesi-wordlist/main/outputs/snippets.md"
BRANCH_NAME: "new-assets"
jobs:
fetch-includes:
runs-on: ubuntu-latest
steps:
- name: "Set Up Env"
uses: actions/checkout@v4
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git checkout -b ${BRANCH_NAME}
mkdir -pv docs/assets/glossary
- name: Fetch Module List
run: wget -O docs/assets/module-list.json ${MODULES_LIST_URL}
- name: Link apps pages
run: python3 .github/workflows/link_apps_pages.py
- name: Fetch Glossary
run: wget -O overrides/partials/glossary.html ${GLOSSARY_URL}
- name: Fetch Dictionary
run: wget -O docs/assets/glossary/dictionary.txt ${DICTIONARY_URL}
- name: Fetch Snippets
run: wget -O docs/assets/glossary/snippets.md ${SNIPPETS_URL}
- name: Commit to Branch '${BRANCH_NAME}'
run: |
git pull origin main
git add --all
- run: git commit -m "update remote assets"
- name: Push, and make PR
run: |
git push origin ${BRANCH_NAME}
gh pr create -B main -H ${BRANCH_NAME} --title 'Update Remote Assets' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}