Skip to content

Commit 3719b78

Browse files
authored
chore: automate checkpoints updates (#6641)
1 parent deb4bd8 commit 3719b78

File tree

2 files changed

+24
-40
lines changed

2 files changed

+24
-40
lines changed

.github/CHECKPOINT_ISSUE_TEMPLATE.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/checkpoints.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
1-
name: Checkpoints
1+
name: Checkpoints Auto Update
22

33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: "0 0 1 * *" # The 1st of every month
6+
# Everyday at midnight UTC
7+
- cron: "0 0 * * *"
78

89
jobs:
9-
checkpoint_issue:
10+
update-checkpoints:
1011
runs-on: ubuntu-slim
1112
steps:
1213
- uses: actions/checkout@v6
13-
- uses: JasonEtco/create-an-issue@v2
14-
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
- name: Update checkpoints
15+
run: |
16+
docker run --rm -v $PWD:/app -w /app --entrypoint forest-dev ghcr.io/chainsafe/forest:edge update-checkpoints
17+
# This is needed in order to have the commits signed.
18+
- uses: actions/create-github-app-token@v2
19+
id: generate-token
1620
with:
17-
filename: .github/CHECKPOINT_ISSUE_TEMPLATE.md
21+
app-id: ${{ secrets.LESHY_APP_ID }}
22+
private-key: ${{ secrets.LESHY_APP_PRIVATE_KEY }}
23+
- name: Create Pull Request
24+
uses: peter-evans/create-pull-request@v8
25+
with:
26+
base: main
27+
branch: leshy/update-forest-checkpoints
28+
token: ${{ steps.generate-token.outputs.token }}
29+
commit-message: Update Forest checkpoints
30+
sign-commits: true
31+
title: "[automated] Update Forest checkpoints"
32+
body: |
33+
### Changes
34+
- Updates Forest checkpoints

0 commit comments

Comments
 (0)