ci: update global workflows (#661)
This commit is contained in:
@@ -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
|
# 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.
|
# 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
|
name: Auto create PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
@@ -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
|
# 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.
|
# the above-mentioned repo.
|
||||||
|
|
||||||
|
# This workflow will, first, automatically approve PRs created by @LizardByte-bot. Then it will automerge relevant PRs.
|
||||||
|
|
||||||
name: Automerge PR
|
name: Automerge PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -11,6 +13,10 @@ on:
|
|||||||
- opened
|
- opened
|
||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
autoapprove:
|
autoapprove:
|
||||||
if: >-
|
if: >-
|
||||||
@@ -40,9 +46,6 @@ jobs:
|
|||||||
if: startsWith(github.repository, 'LizardByte/')
|
if: startsWith(github.repository, 'LizardByte/')
|
||||||
needs: [autoapprove]
|
needs: [autoapprove]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
concurrency:
|
|
||||||
group: automerge-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Automerging
|
- name: Automerging
|
||||||
|
|||||||
@@ -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
|
# 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.
|
# the above-mentioned repo.
|
||||||
|
|
||||||
|
# Label PRs with `autoupdate` if various conditions are met, otherwise, remove the label.
|
||||||
|
|
||||||
name: Label PR autoupdate
|
name: Label PR autoupdate
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -38,7 +40,6 @@ jobs:
|
|||||||
contains(github.event.pull_request.labels.*.name, 'autoupdate') == false &&
|
contains(github.event.pull_request.labels.*.name, 'autoupdate') == false &&
|
||||||
contains(github.event.pull_request.body,
|
contains(github.event.pull_request.body,
|
||||||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true
|
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true
|
||||||
|
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
github-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
# - automerge
|
# - automerge
|
||||||
# - autoupdate-labeler
|
# - 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.
|
# 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
|
name: autoupdate
|
||||||
|
|
||||||
@@ -39,14 +40,7 @@ jobs:
|
|||||||
startsWith(github.repository, 'LizardByte/')
|
startsWith(github.repository, 'LizardByte/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: check labels
|
|
||||||
id: label
|
|
||||||
run: |
|
|
||||||
echo "central_dep=${{ contains(github.event.pull_request.labels.*.name, 'central_dependency') }}" \
|
|
||||||
>> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: rebase
|
- name: rebase
|
||||||
if: ${{ steps.label.outputs.central_dep == 'false' }}
|
|
||||||
uses: "bbeesley/gha-auto-dependabot-rebase@v1.2.0"
|
uses: "bbeesley/gha-auto-dependabot-rebase@v1.2.0"
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -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
|
# 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.
|
# the above-mentioned repo.
|
||||||
|
|
||||||
|
# Manage stale issues and PRs.
|
||||||
|
|
||||||
name: Stale Issues / PRs
|
name: Stale Issues / PRs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
@@ -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
|
# 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.
|
# the above-mentioned repo.
|
||||||
|
|
||||||
|
# Label and un-label actions using `../label-actions.yml`.
|
||||||
|
|
||||||
name: Issues
|
name: Issues
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
|||||||
@@ -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
|
# 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.
|
# the above-mentioned repo.
|
||||||
|
|
||||||
|
# Ensure PRs are made against `nightly` branch.
|
||||||
|
|
||||||
name: Pull Requests
|
name: Pull Requests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize, edited, reopened]
|
types: [opened, synchronize, edited, reopened]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-pull-request:
|
check-pull-request:
|
||||||
name: Check Pull Request
|
name: Check Pull Request
|
||||||
|
|||||||
@@ -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
|
# 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.
|
# the above-mentioned repo.
|
||||||
|
|
||||||
|
# Lint yaml files.
|
||||||
|
|
||||||
name: yaml lint
|
name: yaml lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -10,6 +12,10 @@ on:
|
|||||||
branches: [master, nightly]
|
branches: [master, nightly]
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
yaml-lint:
|
yaml-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user