-
Notifications
You must be signed in to change notification settings - Fork 26
42 lines (36 loc) · 1.14 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
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: 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