Check Polkadot Releases #195
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: Check Polkadot Releases | |
on: | |
schedule: | |
- cron: "0 0 * * *" # midnight (UTC) | |
env: | |
REPO_URL: https://api.github.com/repos/paritytech/polkadot-sdk | |
TRACKING_GIT_BRANCH: ci/latest-polkadot-full-release | |
RELEASE_TRACK_FILENAME: .github/.latest-polkadot-full-release.txt | |
jobs: | |
record-polkadot-latest-release-version: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Timestamp | |
run: date | |
- name: Check Out Repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{env.TRACKING_GIT_BRANCH}} | |
token: ${{secrets.GHA_RECORD_POLKADOT_RELEASE}} | |
- name: Print Recorded Latest Polkadot Release | |
run: | | |
echo "Recorded Polkadot Latest Full Release:" | |
echo "--------------------------------------" | |
cat ${{env.RELEASE_TRACK_FILENAME}} | |
- name: Fetch Latest Release Version | |
run: | | |
curl -sL $REPO_URL/releases/latest | \ | |
jq -r ".tag_name" > ${{env.RELEASE_TRACK_FILENAME}} | |
echo "Fetched Polkadot Latest Full Release:" | |
echo "-------------------------------------" | |
cat ${{env.RELEASE_TRACK_FILENAME}} | |
- name: Commit Latest Release Version | |
id: commit-updated-weights | |
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d | |
with: | |
commit_message: "Record new Polkadot release version" | |
commit_user_name: Frequency CI [bot] | |
commit_user_email: [email protected] | |
commit_author: Frequency CI [bot] <[email protected]> |