mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
ci: Fix lint check status update (#2224)
* ci: Fix lint check status update The lint workflow is not important for this PR, but a fixed requirement to pass for merging. As this workflow is triggered by `schedule` or `workflow_dispatch`, it will not trigger other events such as `pull_request` for other workflows to respond to. Since the linting workflow is not important for this type of PR, we can pretend it was "skipped" and set the check status to "success". This is simpler than running the actual Lint workflow redundantly. * ci: Remove workflow_run approach This didn't work out, reverting.
This commit is contained in:
parent
f2c4712c4f
commit
7b4ce69c3f
19
.github/workflows/contributors.yml
vendored
19
.github/workflows/contributors.yml
vendored
|
@ -41,3 +41,22 @@ jobs:
|
|||
PATH: '/CONTRIBUTORS.md'
|
||||
COMMIT_MESSAGE: 'docs(CONTRIBUTORS): update contributors'
|
||||
AVATAR_SHAPE: 'round'
|
||||
|
||||
# This workflow will not trigger a `pull_request` event without a PAT.
|
||||
# The lint workflow is not important for this type of PR, skip it and pretend it was successful:
|
||||
- name: 'Get the latest commit hash from the contributors-update branch'
|
||||
id: commit-data
|
||||
run: 'echo "::set-output name=head_sha::$(git rev-parse contributors-update)"'
|
||||
|
||||
- name: 'Commit Status: Set Lint status to success (skipped)'
|
||||
uses: myrotvorets/set-commit-status-action@1.1.4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Skipped workflows are still assigned a "success" status:
|
||||
status: success
|
||||
# This should be the correct commit SHA on the contributors-update branch:
|
||||
sha: ${{ steps.commit-data.outputs.head_sha }}
|
||||
# Name of status check to add/update:
|
||||
context: 'lint'
|
||||
# Optional message/note we can inline to the right of the context name in the UI:
|
||||
description: "Lint skipped. Not relevant."
|
||||
|
|
5
.github/workflows/linting.yml
vendored
5
.github/workflows/linting.yml
vendored
|
@ -6,11 +6,6 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- master
|
||||
# These workflows when done will trigger this workflow too:
|
||||
workflow_run:
|
||||
workflows: ['Update contributors']
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
|
Loading…
Reference in a new issue