mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
workflows/check: always run commits job
This is the very first step to extending the commits job to do more than
just cherry-picks in the future: It could check reverts or merge
commits, but also the commit message format and more.
Of course, cherry-picks are still just checked on the stable branches as
before. For now, this allows us to run the part that dismisses automated
reviews automatically. This helps us when we do branch related checks in
the prepare step, which would also create such a review. To avoid
cluttering multiple reviews across a PR, we'll want all of these reviews
to be handled by the same code, thus this change.
(cherry picked from commit b6bbf7b250)
This commit is contained in:
committed by
github-actions[bot]
parent
edde2afc1f
commit
59eb6387fa
11
.github/workflows/check.yml
vendored
11
.github/workflows/check.yml
vendored
@@ -45,10 +45,7 @@ jobs:
|
||||
EOF
|
||||
exit 1
|
||||
|
||||
cherry-pick:
|
||||
if: |
|
||||
github.event_name == 'pull_request' ||
|
||||
(fromJSON(inputs.baseBranch).stable && !contains(fromJSON(inputs.headBranch).type, 'development'))
|
||||
commits:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-24.04-arm
|
||||
@@ -68,16 +65,20 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh api /rate_limit | jq
|
||||
|
||||
- name: Check cherry-picks
|
||||
- name: Check commits
|
||||
id: check
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
env:
|
||||
TARGETS_STABLE: ${{ fromJSON(inputs.baseBranch).stable && !contains(fromJSON(inputs.headBranch).type, 'development') }}
|
||||
with:
|
||||
script: |
|
||||
const targetsStable = JSON.parse(process.env.TARGETS_STABLE)
|
||||
require('./trusted/ci/github-script/commits.js')({
|
||||
github,
|
||||
context,
|
||||
core,
|
||||
dry: context.eventName == 'pull_request',
|
||||
cherryPicks: context.eventName == 'pull_request' || targetsStable,
|
||||
})
|
||||
|
||||
- name: Log current API rate limits
|
||||
|
||||
Reference in New Issue
Block a user