ci: update global workflows (#1705)
This commit is contained in:
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -10,7 +10,6 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "08:00"
|
time: "08:00"
|
||||||
target-branch: "nightly"
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
@@ -18,7 +17,6 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "08:30"
|
time: "08:30"
|
||||||
target-branch: "nightly"
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
@@ -26,7 +24,6 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "09:00"
|
time: "09:00"
|
||||||
target-branch: "nightly"
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
- package-ecosystem: "nuget"
|
- package-ecosystem: "nuget"
|
||||||
@@ -34,7 +31,6 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "09:30"
|
time: "09:30"
|
||||||
target-branch: "nightly"
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
- package-ecosystem: "pip"
|
- package-ecosystem: "pip"
|
||||||
@@ -42,7 +38,6 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "10:00"
|
time: "10:00"
|
||||||
target-branch: "nightly"
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
- package-ecosystem: "gitsubmodule"
|
- package-ecosystem: "gitsubmodule"
|
||||||
@@ -50,5 +45,4 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
time: "10:30"
|
time: "10:30"
|
||||||
target-branch: "nightly"
|
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|||||||
72
.github/workflows/autoupdate-labeler.yml
vendored
72
.github/workflows/autoupdate-labeler.yml
vendored
@@ -1,72 +0,0 @@
|
|||||||
---
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# Label PRs with `autoupdate` if various conditions are met, otherwise, remove the label.
|
|
||||||
|
|
||||||
name: Label PR autoupdate
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types:
|
|
||||||
- edited
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
- synchronize
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
label_pr:
|
|
||||||
if: >-
|
|
||||||
startsWith(github.repository, 'LizardByte/') &&
|
|
||||||
contains(github.event.pull_request.body, fromJSON('"] I want maintainers to keep my branch updated"'))
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
steps:
|
|
||||||
- name: Check if member
|
|
||||||
id: org_member
|
|
||||||
run: |
|
|
||||||
status="true"
|
|
||||||
gh api \
|
|
||||||
-H "Accept: application/vnd.github+json" \
|
|
||||||
/orgs/${{ github.repository_owner }}/members/${{ github.actor }} || status="false"
|
|
||||||
|
|
||||||
echo "result=${status}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Label autoupdate
|
|
||||||
if: >-
|
|
||||||
steps.org_member.outputs.result == 'true' &&
|
|
||||||
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 }}
|
|
||||||
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.labels.*.name, 'autoupdate') &&
|
|
||||||
(
|
|
||||||
(github.event.action == 'synchronize' && steps.org_member.outputs.result == 'false') ||
|
|
||||||
(contains(github.event.pull_request.body,
|
|
||||||
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == false
|
|
||||||
)
|
|
||||||
)
|
|
||||||
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']
|
|
||||||
})
|
|
||||||
51
.github/workflows/autoupdate.yml
vendored
51
.github/workflows/autoupdate.yml
vendored
@@ -1,51 +0,0 @@
|
|||||||
---
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# This workflow is designed to work with the following workflows:
|
|
||||||
# - automerge
|
|
||||||
# - autoupdate-labeler
|
|
||||||
|
|
||||||
# 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. (disabled)
|
|
||||||
|
|
||||||
name: autoupdate
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'nightly'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
autoupdate:
|
|
||||||
name: Autoupdate autoapproved PR created in the upstream
|
|
||||||
if: startsWith(github.repository, 'LizardByte/')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Update
|
|
||||||
uses: docker://chinthakagodawita/autoupdate-action:v1
|
|
||||||
env:
|
|
||||||
EXCLUDED_LABELS: "central_dependency,dependencies"
|
|
||||||
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}'
|
|
||||||
PR_FILTER: "labelled"
|
|
||||||
PR_LABELS: "autoupdate"
|
|
||||||
PR_READY_STATE: "all"
|
|
||||||
MERGE_CONFLICT_ACTION: "fail"
|
|
||||||
|
|
||||||
# Disabled due to:
|
|
||||||
# - no major version tag, resulting in constant nagging to update this action
|
|
||||||
# - additionally, the code is sketchy, 16k+ lines of code?
|
|
||||||
# https://github.com/bbeesley/gha-auto-dependabot-rebase/blob/main/dist/main.cjs
|
|
||||||
#
|
|
||||||
# dependabot-rebase:
|
|
||||||
# name: Dependabot Rebase
|
|
||||||
# if: >-
|
|
||||||
# startsWith(github.repository, 'LizardByte/')
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - name: rebase
|
|
||||||
# uses: "bbeesley/gha-auto-dependabot-rebase@v1.3.18"
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
|
||||||
12
.github/workflows/issues-stale.yml
vendored
12
.github/workflows/issues-stale.yml
vendored
@@ -31,12 +31,15 @@ jobs:
|
|||||||
exempt-pr-labels: 'dependencies,l10n'
|
exempt-pr-labels: 'dependencies,l10n'
|
||||||
stale-issue-label: 'stale'
|
stale-issue-label: 'stale'
|
||||||
stale-issue-message: >
|
stale-issue-message: >
|
||||||
This issue is stale because it has been open for 90 days with no activity.
|
:wave: @{issue-author}, It seems this issue hasn't had any activity in the past 90 days.
|
||||||
Comment or remove the stale label, otherwise this will be closed in 10 days.
|
If it's still something you'd like addressed, please let us know by leaving a comment.
|
||||||
|
Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
|
||||||
stale-pr-label: 'stale'
|
stale-pr-label: 'stale'
|
||||||
stale-pr-message: >
|
stale-pr-message: >
|
||||||
This PR is stale because it has been open for 90 days with no activity.
|
:wave: @{issue-author}, It looks like this PR has been idle for 90 days.
|
||||||
Comment or remove the stale label, otherwise this will be closed in 10 days.
|
If it's still something you're working on or would like to pursue,
|
||||||
|
please leave a comment or update your branch.
|
||||||
|
Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!
|
||||||
repo-token: ${{ secrets.GH_BOT_TOKEN }}
|
repo-token: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
|
|
||||||
- name: Invalid Template
|
- name: Invalid Template
|
||||||
@@ -48,7 +51,6 @@ jobs:
|
|||||||
This PR was closed because the the template was not completed after 5 days.
|
This PR was closed because the the template was not completed after 5 days.
|
||||||
days-before-stale: 0
|
days-before-stale: 0
|
||||||
days-before-close: 5
|
days-before-close: 5
|
||||||
exempt-pr-labels: 'dependencies,l10n'
|
|
||||||
only-labels: 'invalid:template-incomplete'
|
only-labels: 'invalid:template-incomplete'
|
||||||
stale-issue-label: 'invalid:template-incomplete'
|
stale-issue-label: 'invalid:template-incomplete'
|
||||||
stale-issue-message: >
|
stale-issue-message: >
|
||||||
|
|||||||
32
.github/workflows/pull-requests.yml
vendored
32
.github/workflows/pull-requests.yml
vendored
@@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# Ensure PRs are made against `nightly` branch.
|
|
||||||
|
|
||||||
name: Pull Requests
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [opened, synchronize, edited, reopened]
|
|
||||||
|
|
||||||
# no concurrency for pull_request_target events
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-pull-request:
|
|
||||||
name: Check Pull Request
|
|
||||||
if: startsWith(github.repository, 'LizardByte/')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: Vankka/pr-target-branch-action@v2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
target: master
|
|
||||||
exclude: nightly # Don't prevent going from nightly -> master
|
|
||||||
change-to: nightly
|
|
||||||
comment: |
|
|
||||||
Your PR was set to `master`, PRs should be sent to `nightly`.
|
|
||||||
The base branch of this PR has been automatically changed to `nightly`.
|
|
||||||
Please check that there are no merge conflicts
|
|
||||||
Reference in New Issue
Block a user