-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (34 loc) · 1.29 KB
/
update-accessibility-data.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
name: Automated - Update accessibility data
'on':
schedule:
- cron: '0 2 * * *'
jobs:
get_data_and_commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{secrets.STATS_PAT}}
ref: 'main'
- name: Create env file
run: |
touch .env.secrets
echo DATA_SA_KEY=${{ secrets.DATA_SA_KEY }} >> .env.secrets
echo DATA_PROJECT_ID=${{ secrets.DATA_PROJECT_ID }} >> .env.secrets
echo DATA_STORAGE_BUCKET=${{ secrets.DATA_STORAGE_BUCKET }} >> .env.secrets
echo DATA_STORAGE_FILE=${{ secrets.DATA_STORAGE_FILE }} >> .env.secrets
- name: Update accessibility data
run: 'npm ci && npm run update-accessibility-data'
- name: Check if there are any changes
id: verify_diff
run: git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit & push data
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name 'Appt Stats'
git config --global user.email '167291111+stats-appt-org@users.noreply.github.com'
git add .
git commit -am "Automated accessibility data update"
git push
env:
GITHUB_TOKEN: ${{ secrets.STATS_PAT }}