-
Notifications
You must be signed in to change notification settings - Fork 26
61 lines (53 loc) · 1.83 KB
/
url_checker.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: update url_allowlist.csv
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * MON' # At 00:00 on Monday
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./test
steps:
- name: checkout repo content
uses: actions/checkout@v4 # checkout the repository content
with:
fetch-depth: 0
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.11' # install the python version needed
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
#- name: execute py script # run url_checker.py
# env:
# DC_API_KEY: ${{ secrets.DC_API_KEY }}
# run: python url_checker.py --update_allowlist
- name: test
run: |
printf ".env\n\n\n" > .gitignore
#- name: create pull request
# uses: peter-evans/create-pull-request@v6
# with:
# commit-message: Update url_allowlist.csv
# committer: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
# author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
# signoff: false
# delete-branch: true
# title: 'Update url_allowlist.csv'
# body: |
# Auto-update url_allowlist.csv with url_checker.yml
# labels: |
# report
# automated pr
- name: commit changes
run: |
git config --global user.name "datcom-bot"
git config --global user.email "[email protected]"
git add --all
git commit -am "Auto-update url_allowlist.csv: $(date)"
git push