mirror of
https://github.com/opencontainers/runc.git
synced 2025-09-26 19:41:35 +08:00
gha/ci: allow validate/all-done to succeed for non-PRs
When we run CI not on a pull request, the commit job is skipped, as a result, all-done is also skipped. To allow all-done to succeed, modify the commit job to succeed for non-PRs. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
8
.github/workflows/validate.yml
vendored
8
.github/workflows/validate.yml
vendored
@@ -157,22 +157,26 @@ jobs:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
runs-on: ubuntu-24.04
|
||||
# Only check commits on pull requests.
|
||||
if: github.event_name == 'pull_request'
|
||||
steps:
|
||||
- name: get pr commits
|
||||
if: github.event_name == 'pull_request' # Only check commits on pull requests.
|
||||
id: 'get-pr-commits'
|
||||
uses: tim-actions/get-pr-commits@v1.3.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: check subject line length
|
||||
if: github.event_name == 'pull_request' # Only check commits on pull requests.
|
||||
uses: tim-actions/commit-message-checker-with-regex@v0.3.2
|
||||
with:
|
||||
commits: ${{ steps.get-pr-commits.outputs.commits }}
|
||||
pattern: '^.{0,72}(\n.*)*$'
|
||||
error: 'Subject too long (max 72)'
|
||||
|
||||
- name: succeed (not a PR) # Allow all-done to succeed for non-PRs.
|
||||
if: github.event_name != 'pull_request'
|
||||
run: echo "Nothing to check here."
|
||||
|
||||
cfmt:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
|
Reference in New Issue
Block a user