-
Notifications
You must be signed in to change notification settings - Fork 40
60 lines (57 loc) · 1.96 KB
/
update-ii.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# A GitHub Actions workflow that regularly checks for new Internet Identity
# and creates a PR when there is.
name: II Update
on:
schedule:
# check for new II versions weekly
- cron: '30 3 * * MON'
workflow_dispatch:
push:
branches:
# The development branch for this workflow:
- "update-ii"
jobs:
ii-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update II
id: update
run: |
./scripts/update-ii
if [ -n "$(git status --porcelain)" ]
then
echo A new Internet Identity is available
echo "updated=1" >> "$GITHUB_OUTPUT"
else
echo "updated=0" >> "$GITHUB_OUTPUT"
fi
# If Internet Identity was updated, create a PR.
- name: Create Pull Request
if: ${{ steps.update.outputs.updated == '1' }}
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GIX_BOT_PAT }}
base: main
add-paths: ./dfx.json
commit-message: Update Internet Identity
committer: GitHub <[email protected]>
author: gix-bot <[email protected]>
branch: bot-ii-update
delete-branch: true
title: 'Update II version'
body: |
# Motivation
We would like to test with a recent version of Internet Identity.
# Changes
* Updated `internet_identity` version in `dfx.json`.
# Tests
- See CI
# Since the this is a scheduled job, a failure won't be shown on any
# PR status. To notify the team, we send a message to our Slack channel on failure.
- name: Notify Slack on failure
uses: dfinity/internet-identity/.github/actions/slack@release-2023-08-28
if: ${{ failure() }}
with:
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: "Internet Identity update failed"