diff --git a/.github/workflows/docker_bin.yml b/.github/workflows/docker_bin.yml index d3872a78b..f6c164e1e 100644 --- a/.github/workflows/docker_bin.yml +++ b/.github/workflows/docker_bin.yml @@ -15,6 +15,7 @@ on: push: paths: - 'files/docker/node/release-versions/cardano-node-latest.txt' + - 'files/docker/node/release-versions/mithril-latest.txt' jobs: build: diff --git a/.github/workflows/mithril-latest.yml b/.github/workflows/mithril-latest.yml new file mode 100644 index 000000000..9a247fc34 --- /dev/null +++ b/.github/workflows/mithril-latest.yml @@ -0,0 +1,30 @@ +name: Get latest Mithril release version +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' +jobs: + get-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + 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' 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: 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' + 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 diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index bb2153f40..1c3d09595 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -493,10 +493,7 @@ download_cardanosigner() { download_mithril() { echo -e "\nDownloading Mithril..." pushd "${HOME}"/tmp >/dev/null || err_exit - # dynamic latest release updated automatically, uncomment and comment out the hardcoded release below if needed - # mithril_release="$(curl -s https://api.github.com/repos/input-output-hk/mithril/releases/latest | jq -r '.tag_name')" - # hardcoded latest release requiring a bump - mithril_release="2342.0" + mithril_release="$(curl -s https://api.github.com/repos/input-output-hk/mithril/releases/latest | jq -r '.tag_name')" echo -e "\n Downloading Mithril Signer/Client ${mithril_release}..." rm -f mithril-signer mithril-client curl -m 200 -sfL https://github.com/input-output-hk/mithril/releases/download/${mithril_release}/mithril-${mithril_release}-linux-x64.tar.gz -o mithril.tar.gz || err_exit " Could not download mithril's latest release archive from IO github!"