2023-02-14 03:29:58 +00:00
|
|
|
name: update-flake
|
2023-02-14 02:46:33 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
# run action when a change lands in the main branch which updates go.mod. Also
|
|
|
|
# allow manual triggering.
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- go.mod
|
|
|
|
- .github/workflows/update-flakes.yml
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
2023-03-16 15:55:19 +00:00
|
|
|
update-flake:
|
2023-02-14 02:46:33 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out code
|
2024-09-23 20:52:19 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2023-02-14 02:46:33 +00:00
|
|
|
|
|
|
|
- name: Run update-flakes
|
2023-02-14 03:29:58 +00:00
|
|
|
run: ./update-flake.sh
|
2023-02-14 02:46:33 +00:00
|
|
|
|
|
|
|
- name: Get access token
|
2024-09-24 16:01:00 +00:00
|
|
|
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
|
2023-02-14 02:46:33 +00:00
|
|
|
id: generate-token
|
|
|
|
with:
|
|
|
|
app_id: ${{ secrets.LICENSING_APP_ID }}
|
2024-09-24 16:01:00 +00:00
|
|
|
installation_retrieval_mode: "id"
|
|
|
|
installation_retrieval_payload: ${{ secrets.LICENSING_APP_INSTALLATION_ID }}
|
2023-02-14 02:46:33 +00:00
|
|
|
private_key: ${{ secrets.LICENSING_APP_PRIVATE_KEY }}
|
|
|
|
|
|
|
|
- name: Send pull request
|
2024-09-10 16:08:14 +00:00
|
|
|
uses: peter-evans/create-pull-request@8867c4aba1b742c39f8d0ba35429c2dfa4b6cb20 #v7.0.1
|
2023-02-14 02:46:33 +00:00
|
|
|
with:
|
|
|
|
token: ${{ steps.generate-token.outputs.token }}
|
2023-05-04 01:36:19 +00:00
|
|
|
author: Flakes Updater <noreply+flakes-updater@tailscale.com>
|
|
|
|
committer: Flakes Updater <noreply+flakes-updater@tailscale.com>
|
2023-02-14 02:46:33 +00:00
|
|
|
branch: flakes
|
|
|
|
commit-message: "go.mod.sri: update SRI hash for go.mod changes"
|
|
|
|
title: "go.mod.sri: update SRI hash for go.mod changes"
|
|
|
|
body: Triggered by ${{ github.repository }}@${{ github.sha }}
|
|
|
|
signoff: true
|
|
|
|
delete-branch: true
|
|
|
|
reviewers: danderson
|