-
Notifications
You must be signed in to change notification settings - Fork 178
36 lines (36 loc) · 1.45 KB
/
mithril-latest.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
name: Get latest Mithril release version
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
get-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
fetch-depth: 0
ref: alpha
- name: Fetch Mithril release version
run: |
curl -sL https://api.github.com/repos/input-output-hk/mithril/releases/latest | jq -r '.tag_name' > files/docker/node/release-versions/mithril-latest.txt
- name: Assigns release version
run: |
VERSION=$(cat ./files/docker/node/release-versions/mithril-latest.txt)
- name: Source mithril.library and check upgrade safety
run: |
set -e
. scripts/cnode-helper-scripts/mithril.library workflow
check_mithril_upgrade_safe
echo "MITHRIL_UPGRADE_SAFE=$MITHRIL_UPGRADE_SAFE" >> $GITHUB_ENV
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
- name: Commit latest release version
if: steps.git-check.outputs.modified == 'true' && env.MITHRIL_UPGRADE_SAFE == 'Y'
run: |
git config --global user.name ${{ secrets.REPO_SCOPED_USER }}
git config --global user.email ${{ secrets.REPO_SCOPED_EMAIL }}
git commit -am "New mithril release version ${VERSION}"
git push