Move II updates into a separate workflow #1
Workflow file for this run
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
# 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 | |
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' | |
# 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: "Rust update failed" |