Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ on:
types: [checks_requested]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number && format('pr{0}', github.event.number) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'merge_group' }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Lint:
runs-on: ubuntu-latest

if: ${{ contains('pull_request merge_group', github.event_name) }}
if: ${{ !cancelled() && contains('pull_request merge_group', github.event_name) }}

steps:
- name: Check out code
Expand Down Expand Up @@ -68,13 +68,16 @@ jobs:

# Allow skipped Lint
# Let Lint fail on pull requests
if: |
${{
success()
|| needs.Lint.result == 'skipped'
|| ( needs.Lint.result == 'failure'
&& github.event_name == 'pull_request' )
}}
if: ${{ !cancelled() &&
(
success() ||
needs.Lint.result == 'skipped' ||
(
needs.Lint.result == 'failure' &&
github.event_name == 'pull_request'
)
)
}}
Comment on lines +71 to +80
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a lot of line splitting now, but ok...


outputs:
label: ${{ steps.build-params.outputs.label }}
Expand Down Expand Up @@ -309,9 +312,7 @@ jobs:
Publish-Snap:
needs: BuildAndTest
# Need to explicitly continue on Lint getting skipped.
if: ${{
!failure()
&& !cancelled()
if: ${{ !cancelled() && success()
&& needs.BuildAndTest.outputs.channel != ''
&& (github.event_name == 'push'
|| github.event_name == 'merge_group'
Expand Down Expand Up @@ -344,9 +345,7 @@ jobs:

# Only dispatch if we have access to secrets.
# Need to explicitly continue on Lint getting skipped.
if: ${{
!failure()
&& !cancelled()
if: ${{ !cancelled() && success()
&& (github.event_name == 'push'
|| github.event_name == 'merge_group'
|| github.event.pull_request.head.repo.full_name == github.repository)
Expand Down
Loading