Skip to content

Commit

Permalink
ci: enable merge_group in key builds for merge-queue (opentibiabr#2063)
Browse files Browse the repository at this point in the history
  • Loading branch information
luan authored Dec 28, 2023
1 parent e5f5fed commit 836b524
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 66 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/analysis-reviewdog-cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ name: Analysis - Review Dog
on:
pull_request:
paths:
- 'src/**'
- "src/**"
push:
paths:
- 'src/**'
- "src/**"

jobs:

cppcheck:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
concurrent_skipping: "same_content"
cancel_others: true

- name: Check out code.
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/analysis-reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
concurrent_skipping: "same_content"
cancel_others: true

- name: Check out code.
Expand All @@ -32,11 +32,9 @@ jobs:
luac -v
reviewdog -reporter=github-pr-check -runners=luac
luacheck:
runs-on: ubuntu-latest
steps:

- name: Check out code.
uses: actions/checkout@main

Expand All @@ -54,11 +52,9 @@ jobs:
cd "$GITHUB_WORKSPACE"
reviewdog -reporter=github-pr-check -runners=luacheck
shellcheck:
runs-on: ubuntu-latest
steps:

- name: Check out code.
uses: actions/checkout@main

Expand All @@ -67,14 +63,12 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
pattern: '*.sh'
exclude: './.git/*'

pattern: "*.sh"
exclude: "./.git/*"

xmllint:
runs-on: ubuntu-latest
steps:

- name: Check out code.
uses: actions/checkout@main

Expand All @@ -92,11 +86,9 @@ jobs:
xmllint --version
reviewdog -reporter=github-pr-check -runners=xmllint
yamllint:
runs-on: ubuntu-latest
steps:

- name: Check out code.
uses: actions/checkout@main

Expand All @@ -106,11 +98,9 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check


hadolint:
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@main

Expand All @@ -122,7 +112,6 @@ jobs:
actionlint:
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@main

Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
- "src/**"
merge_group:
push:
paths:
- 'src/**'
- "src/**"
branches:
- main

Expand All @@ -18,10 +19,10 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

build_docker_x86:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
Expand All @@ -35,7 +36,7 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
versionSpec: "5.x"

- name: Determine Version
id: gitversion
Expand Down Expand Up @@ -93,7 +94,7 @@ jobs:
if: github.ref != 'refs/heads/main'
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
concurrent_skipping: "same_content"
cancel_others: true

- name: Checkout
Expand All @@ -104,7 +105,7 @@ jobs:
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
versionSpec: "5.x"

- name: Determine Version
id: gitversion
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
- "src/**"
merge_group:
push:
paths:
- 'src/**'
- "src/**"
branches:
- main

env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
MAKEFLAGS: '-j 2'
MAKEFLAGS: "-j 2"

jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/build-windows-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@ on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
- "src/**"
merge_group:
push:
paths:
- 'src/**'
- "src/**"
branches:
- main
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
MAKEFLAGS: '-j 2'
MAKEFLAGS: "-j 2"
jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/build-windows-solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/**'
- "src/**"
merge_group:
push:
paths:
- 'src/**'
- "src/**"
branches:
- main

env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
MAKEFLAGS: '-j 2'
MAKEFLAGS: "-j 2"

jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

job:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/clang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ name: Clang-format
on:
pull_request:
paths:
- 'src/**'
- "src/**"
merge_group:
push:
paths:
- 'src/**'
- "src/**"
jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

build:
runs-on: ubuntu-latest
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/cron-stale.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
name: 'Cron - Stale issues and PRs'
name: "Cron - Stale issues and PRs"
on:
schedule:
- cron: '30 1 * * *'
- cron: "30 1 * * *"

jobs:
cancel-runs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 120 days with no activity.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity.'
stale-issue-message: "This issue is stale because it has been open 120 days with no activity."
stale-pr-message: "This PR is stale because it has been open 45 days with no activity."
days-before-issue-stale: 90
days-before-pr-stale: 30
days-before-issue-close: -1
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lua-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: Lua-format
on:
pull_request:
paths:
- 'data*/**'
- "data*/**"
merge_group:
push:
paths:
- 'data*/**'
- "data*/**"
jobs:
lua-formatter:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'PR - Labeler'
name: "PR - Labeler"
on:
- pull_request_target

Expand All @@ -9,4 +9,4 @@ jobs:
steps:
- uses: actions/labeler@main
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1 change: 1 addition & 0 deletions .github/workflows/tests-lua.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Tests - Lua

on:
pull_request:
merge_group:
push:
branches:
- main
Expand Down

0 comments on commit 836b524

Please sign in to comment.