ci: update global workflows (#532)
This commit is contained in:
@@ -17,8 +17,12 @@ This PR was created automatically.
|
|||||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||||
- [ ] New feature (non-breaking change which adds functionality)
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||||
|
- [ ] Dependency update (updates to dependencies)
|
||||||
- [ ] Documentation update (changes to documentation)
|
- [ ] Documentation update (changes to documentation)
|
||||||
- [ ] Repository update (changes to repository files)
|
- [ ] Repository update (changes to repository files, e.g. `.github/...`)
|
||||||
|
|
||||||
|
## Branch Updates
|
||||||
|
- [x] I want maintainers to keep my branch updated
|
||||||
|
|
||||||
## Changelog Summary
|
## Changelog Summary
|
||||||
<!--- Summarize all the changes in a bulleted list. --->
|
<!--- Summarize all the changes in a bulleted list. --->
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create_pr:
|
create_pr:
|
||||||
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
autoapprove:
|
autoapprove:
|
||||||
if: >
|
if: >-
|
||||||
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) &&
|
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) &&
|
||||||
contains(fromJson('["LizardByte-bot"]'), github.actor)
|
contains(fromJson('["LizardByte-bot"]'), github.actor) &&
|
||||||
|
startsWith(github.repository, 'LizardByte/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Autoapproving
|
- name: Autoapproving
|
||||||
@@ -36,6 +37,7 @@ jobs:
|
|||||||
})
|
})
|
||||||
|
|
||||||
automerge:
|
automerge:
|
||||||
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
needs: [autoapprove]
|
needs: [autoapprove]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
# This action is centrally managed in https://github.com/<organization>/.github/
|
||||||
|
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
|
||||||
|
# the above-mentioned repo.
|
||||||
|
|
||||||
|
name: Label PR autoupdate
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- edited
|
||||||
|
- opened
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label_pr:
|
||||||
|
if: >-
|
||||||
|
startsWith(github.repository, 'LizardByte/') &&
|
||||||
|
contains(github.event.pull_request.body, fromJSON('"] I want maintainers to keep my branch updated\r"'))
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Label autoupdate
|
||||||
|
if: >-
|
||||||
|
contains(github.event.pull_request.body,
|
||||||
|
fromJSON('"\n- [x] I want maintainers to keep my branch updated\r"')) == true
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
script: |
|
||||||
|
github.rest.issues.addLabels({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
labels: ['autoupdate']
|
||||||
|
})
|
||||||
|
|
||||||
|
- name: Unlabel autoupdate
|
||||||
|
if: >-
|
||||||
|
contains(github.event.pull_request.body,
|
||||||
|
fromJSON('"\n- [x] I want maintainers to keep my branch updated\r"')) == false &&
|
||||||
|
contains(github.event.pull_request.labels.*.name, 'autoupdate')
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
script: |
|
||||||
|
github.rest.issues.removeLabel({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
name: ['autoupdate']
|
||||||
|
})
|
||||||
@@ -17,7 +17,7 @@ on:
|
|||||||
- 'nightly'
|
- 'nightly'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
autoupdate-for-bot:
|
autoupdate:
|
||||||
name: Autoupdate autoapproved PR created in the upstream
|
name: Autoupdate autoapproved PR created in the upstream
|
||||||
if: startsWith(github.repository, 'LizardByte/')
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -25,8 +25,19 @@ jobs:
|
|||||||
- name: Update
|
- name: Update
|
||||||
uses: docker://chinthakagodawita/autoupdate-action:v1
|
uses: docker://chinthakagodawita/autoupdate-action:v1
|
||||||
env:
|
env:
|
||||||
|
EXCLUDED_LABELS: "central_dependency,dependencies"
|
||||||
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}'
|
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}'
|
||||||
PR_FILTER: "labelled"
|
PR_FILTER: "labelled"
|
||||||
PR_LABELS: "autoupdate"
|
PR_LABELS: "autoupdate"
|
||||||
PR_READY_STATE: "ready_for_review"
|
PR_READY_STATE: "all"
|
||||||
MERGE_CONFLICT_ACTION: "ignore"
|
MERGE_CONFLICT_ACTION: "fail"
|
||||||
|
|
||||||
|
dependabot-rebase:
|
||||||
|
name: Dependabot Rebase
|
||||||
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: rebase
|
||||||
|
uses: "bbeesley/gha-auto-dependabot-rebase@v1.2.0"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
name: Check Stale Issues / PRs
|
name: Check Stale Issues / PRs
|
||||||
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Stale
|
- name: Stale
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
label:
|
label:
|
||||||
name: Label Actions
|
name: Label Actions
|
||||||
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Label Actions
|
- name: Label Actions
|
||||||
uses: dessant/label-actions@v2
|
uses: dessant/label-actions@v3
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
check-pull-request:
|
check-pull-request:
|
||||||
name: Check Pull Request
|
name: Check Pull Request
|
||||||
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: Vankka/pr-target-branch-action@v2
|
- uses: Vankka/pr-target-branch-action@v2
|
||||||
|
|||||||
Reference in New Issue
Block a user