mirror of
https://github.com/tailscale/tailscale.git
synced 2026-06-26 08:45:40 -04:00
Add zizmor GitHub Actions linting on changes to .github/workflows. Updates tailscale/corp#28760 Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
name: update-flake
|
|
|
|
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-flake.yml
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
update-flake:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Run updateflakes
|
|
run: ./tool/go run ./tool/updateflakes
|
|
|
|
- name: Get access token
|
|
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
|
|
id: generate-token
|
|
with:
|
|
# Get token for app: https://github.com/apps/tailscale-code-updater
|
|
app-id: ${{ secrets.CODE_UPDATER_APP_ID }}
|
|
private-key: ${{ secrets.CODE_UPDATER_APP_PRIVATE_KEY }}
|
|
# Limit the token to only pushing a branch and opening a pull request.
|
|
permission-contents: write
|
|
permission-pull-requests: write
|
|
|
|
- name: Send pull request
|
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 #v8.1.0
|
|
with:
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
author: Flakes Updater <noreply+flakes-updater@tailscale.com>
|
|
committer: Flakes Updater <noreply+flakes-updater@tailscale.com>
|
|
branch: flakes
|
|
commit-message: "flakehashes.json: update SRI hash for go.mod changes"
|
|
title: "flakehashes.json: update SRI hash for go.mod changes"
|
|
body: Triggered by ${{ github.repository }}@${{ github.sha }}
|
|
signoff: true
|
|
delete-branch: true
|
|
reviewers: danderson
|