-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (34 loc) · 1.12 KB
/
fetch-assets.yaml
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
43
name: Fetch Assets
on:
push:
branches:
- main
jobs:
fetch_songs:
runs-on: windows-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Disable line-ending conversion
run: |
git config --global core.autocrlf false
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Dependencies
run: |
pip install -r requirements.txt
- name: Execute fetch_assets.py
run: python fetch_assets.py
- name: Commit changes
run: |
git config --global user.name "github-actions"
git config --global user.email "actions@github.com"
git add .
git commit -m "Update assets info" || echo "No changes to commit"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:${{ github.ref }}