37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
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."
|