-
Notifications
You must be signed in to change notification settings - Fork 138
51 lines (45 loc) · 1.58 KB
/
update-dapps.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
# A GitHub Actions workflow that regularly creates a pull request to update dapps list & logos
name: Dapps Update
on:
schedule:
# Check for updates daily
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
dapps-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- run: npm ci
# Run the update
- name: Check new dapps file
id: update
run: ./scripts/update-dapps
# Run the formatter so that the dapps.json file is formatted
- run: npm run format
# If the dapps changed, create a PR.
# This action creates a PR only if there are changes.
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GIX_BOT_PAT }}
base: main
add-paths: |
src/frontend/src/flows/dappsExplorer/dapps.json
src/frontend/src/assets/icons
commit-message: Update dapps
committer: GitHub <[email protected]>
author: gix-bot <[email protected]>
branch: bot-dapps-update
delete-branch: true
title:
"Update dapps list"
# Since the this is a scheduled job, a failure won't be shown on any
# PR status. To notify the team, we send a message to our Slack channel on failure.
- name: Notify Slack on failure
uses: ./.github/actions/slack
if: ${{ failure() }}
with:
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: "Dapps update failed"