ci: update global workflows (#661)

This commit is contained in:
LizardByte-bot 2022-12-31 22:38:46 -05:00 committed by GitHub
parent a5213c6225
commit 17cd230c55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 12 deletions

View File

@ -3,6 +3,9 @@
# 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.
# This workflow creates a PR automatically when anything is merged/pushed into the `nightly` branch. The PR is created
# against the `master` (default) branch.
name: Auto create PR
on:

View File

@ -3,6 +3,8 @@
# 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.
# This workflow will, first, automatically approve PRs created by @LizardByte-bot. Then it will automerge relevant PRs.
name: Automerge PR
on:
@ -11,6 +13,10 @@ on:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
autoapprove:
if: >-
@ -40,9 +46,6 @@ jobs:
if: startsWith(github.repository, 'LizardByte/')
needs: [autoapprove]
runs-on: ubuntu-latest
concurrency:
group: automerge-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Automerging

View File

@ -3,6 +3,8 @@
# 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.
# Label PRs with `autoupdate` if various conditions are met, otherwise, remove the label.
name: Label PR autoupdate
on:
@ -38,7 +40,6 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'autoupdate') == false &&
contains(github.event.pull_request.body,
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_BOT_TOKEN }}

View File

@ -7,8 +7,9 @@
# - automerge
# - autoupdate-labeler
# It uses GitHub Action that auto-updates pull requests branches, when changes are pushed to their destination branch.
# It uses an action that auto-updates pull requests branches, when changes are pushed to their destination branch.
# Auto-updating to the latest destination branch works only in the context of upstream repo and not forks.
# Dependabot PRs are updated by an action that comments `@depdenabot rebase` on dependabot PRs.
name: autoupdate
@ -39,14 +40,7 @@ jobs:
startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest
steps:
- name: check labels
id: label
run: |
echo "central_dep=${{ contains(github.event.pull_request.labels.*.name, 'central_dependency') }}" \
>> $GITHUB_OUTPUT
- name: rebase
if: ${{ steps.label.outputs.central_dep == 'false' }}
uses: "bbeesley/gha-auto-dependabot-rebase@v1.2.0"
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}

View File

@ -3,6 +3,8 @@
# 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.
# Manage stale issues and PRs.
name: Stale Issues / PRs
on:

View File

@ -3,6 +3,8 @@
# 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.
# Label and un-label actions using `../label-actions.yml`.
name: Issues
on:

View File

@ -3,12 +3,18 @@
# 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.
# Ensure PRs are made against `nightly` branch.
name: Pull Requests
on:
pull_request_target:
types: [opened, synchronize, edited, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-pull-request:
name: Check Pull Request

View File

@ -3,6 +3,8 @@
# 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.
# Lint yaml files.
name: yaml lint
on:
@ -10,6 +12,10 @@ on:
branches: [master, nightly]
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
yaml-lint:
runs-on: ubuntu-latest