-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (55 loc) · 1.87 KB
/
warnings.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
62
63
64
65
name: warnings
on:
# schedule:
# - cron: '*/10 * * * *' # <-- Set your cron here (UTC). Uses github which can be ~2-10 mins late.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout this repo into the Github Actions runner
uses: actions/checkout@master
with:
fetch-depth: 1
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Cache node_modules
uses: actions/cache@v3
id: npm-cache
with:
path: "**/warnings/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}
- name: Install packages if there's no cache
if: steps.npm-cache.outputs.cache-hit != 'true'
run: |-
cd ./"$GITHUB_WORKFLOW"
npm ci
# - name: Set up Python 3.10
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'
- name: Start the data processing using make
env:
BOT_NAME: ${{ github.workflow }} # <-- This makes you bot name available to scripts
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
# MY_API_KEY: ${{ secrets.MY_API_KEY }} # <-- Can make available additional repository secrets here
uses: nick-fields/retry@v2
with:
max_attempts: 5
retry_on: error
timeout_minutes: 5
retry_wait_seconds: 30
command: make all
- name: Commit and push to main branch
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Updated at: ${timestamp}" || exit 0
git push origin main