forked from eiygy/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.3 KB
/
autoupdate-branch.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
name: autoupdate branch
# **What it does**: Any pull requests with "autoupdate" label will get main branch updates.
# **Why we have it**: Our repo-sync automation relies on it.
# **Who does it impact**: Our ability to support the open-source repository.
#
# This workflow checks all open PRs targeting `main` as their base branch and
# will attempt to update them if they have the `autoupdate` label applied.
# It is triggered when a `push` event occurs ON the `main` branch (e.g. a PR
# was merged or a force-push was done).
#
# It should work on all PRs created from source branches within the repo itself
# but is unlikely to work for PRs created from forked repos.
#
# It is still worthwhile to leave it enabled for the `docs` open source repo as
# it should at least be running on `repo-sync` branch PRs.
#
on:
push:
branches:
- main
jobs:
autoupdate:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
name: autoupdate
runs-on: ubuntu-latest
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
env:
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
PR_FILTER: labelled
PR_LABELS: autoupdate
MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow."