Skip to content

Commit ba1c361

Browse files
authored
Merge pull request #25 from ReproNim/yibeichan-patch-1
automatically fetching the latest checksum
2 parents 16a54ef + efe3ff2 commit ba1c361

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/build_deploy.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
name: CI
44

5-
env:
6-
CHECKSUM: 8c5ca141a109ed3075b65c1da2691648e7fc8b16
75
# Controls when the action will run. Triggers the workflow on push or pull request
86
# events but only for the master branch
97
on:
@@ -26,7 +24,16 @@ jobs:
2624
uses: actions/setup-node@v1
2725
with:
2826
node-version: '12.x'
27+
# Install jq if it's not already available
28+
- name: Install jq
29+
run: sudo apt-get install jq
2930

31+
# Fetch the latest commit hash
32+
- name: Get latest commit hash from reproschema-ui
33+
run: |
34+
LATEST_HASH=$(curl -s https://api.github.com/repos/ReproNim/reproschema-ui/commits/master | jq -r '.sha')
35+
echo "CHECKSUM=$LATEST_HASH" >> $GITHUB_ENV
36+
3037
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3138
- uses: actions/checkout@v2
3239

0 commit comments

Comments
 (0)