-
Notifications
You must be signed in to change notification settings - Fork 4
33 lines (29 loc) · 1.13 KB
/
octez_version.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
name: Check Octez version
on:
schedule:
- cron: '0 0 * * *'
jobs:
octez_version:
name: Check the latest Octez release
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Install python-requests
run: sudo apt-get install python3-requests
- name: Check the latest Octez release
run: python3 octez_version.py
- name: Create a PR for new version
if: failure()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export OCTEZ_VERSION=$(cat octez_version)
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git branch -D octez-$OCTEZ_VERSION || true
git checkout -b octez-$OCTEZ_VERSION
git add .
git commit -m "Update Octez binaries to $OCTEZ_VERSION"
git push --force origin octez-$OCTEZ_VERSION
gh pr create --title "Update Octez binaries to $OCTEZ_VERSION" --body "This PR updates the Octez binaries to the latest version $OCTEZ_VERSION" --base master --head octez-$OCTEZ_VERSION