-
Notifications
You must be signed in to change notification settings - Fork 11
45 lines (42 loc) · 1.23 KB
/
my-workflow.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
43
44
45
name: Run Update
on:
push:
branches:
- master
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install requests module
run: pip install requests
- name: Install yaml module
run: pip install pyyaml
- name: setup Github environment
run: |
#setup username and email to use Github Actions Bot with no default email
git config user.name "Github Actions Bot"
git config user.email "<>"
- name: Update COP List
shell: bash
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python cop_bazaar.py &&
mv output output2 &&
echo "checkout output branch" &&
git remote update &&
git fetch &&
git branch &&
git checkout output &&
echo "rm output folder and move updated output folder" &&
rm -rf output &&
mv output2 output &&
echo "add, commit and push output update" &&
git add output &&
git commit -m "Updating output via gitaction" &&
git push