-
Notifications
You must be signed in to change notification settings - Fork 113
63 lines (54 loc) · 1.79 KB
/
combine.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
name: combine
on:
pull_request:
# Allows you to run this workflow manually
workflow_dispatch:
jobs:
combine:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || 'main' }}
# This action secret contains a fine-grained personal access token with permissions to read/write repo content
# It is necessary because the default GITHUB_TOKEN cannot re-trigger workflows after pushing
token: ${{ secrets.COMBINE_CI_TOKEN || secrets.GITHUB_TOKEN }}
- uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
- name: yarn-install
run: |
yarn install
CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES"
git diff
exit 1
fi
- name: foundry-install
uses: foundry-rs/foundry-toolchain@v1
- name: configure-git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: update-nitro-chains
run: |
echo "Updating Nitro chains..."
./scripts/update-nitro-chains.sh
- name: combine-data
run: |
echo "Assembling chain metadata and addresses together..."
yarn build
- name: commit-changes
run: |
CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then
git add .
git commit -m "Update chain metadata and address files"
git push
else
echo "No changes to commit."
fi