-
Notifications
You must be signed in to change notification settings - Fork 19
42 lines (42 loc) · 1.74 KB
/
check-polkadot-releases.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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Check Polkadot Releases
on:
workflow_dispatch:
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-latest
steps:
- name: Timestamp
run: date
- name: Check Out Repo
uses: actions/checkout@v4
with:
ref: ${{env.TRACKING_GIT_BRANCH}}
# While you can write to a branch without it, it will not trigger the workflow
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-release
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842
with:
commit_message: "Record new Polkadot release version"
commit_user_name: Frequency CI [bot]
commit_user_email: do-not-reply@users.noreply.github.com
commit_author: Frequency CI [bot] <do-not-reply@users.noreply.github.com>