-
Notifications
You must be signed in to change notification settings - Fork 15.5k
35 lines (30 loc) · 1.09 KB
/
staleness_refresh.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
name: Auto-generate stale checked-in files
on:
push:
branches:
- main
- '[0-9]+.x'
# The 21.x branch predates support for auto-generation, so we make sure
# to exclude it.
- '!21.x'
workflow_dispatch:
permissions: {}
jobs:
run:
permissions:
contents: write # for git push
if: github.repository == 'protocolbuffers/protobuf'
runs-on: ubuntu-latest
name: Refresh stale files
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
# Note: this token has an expiration date, so if the workflow starts
# failing then you may need to generate a fresh token.
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- name: Configure name and email address in Git
run: cd ${{ github.workspace }} && git config user.name "Protobuf Team Bot" && git config user.email "[email protected]"
- name: Commit and push update
run: cd ${{ github.workspace }} && ./ci/push_auto_update.sh