Skip to content

Commit

Permalink
[GHA] Set concurrency groups for automerge and registry consistency j…
Browse files Browse the repository at this point in the history
…obs (#122059)

* [GHA] Set concurrency groups for automerge and registry consistency jobs

* Apply suggestions from code review

Co-authored-by: Dilum Aluthge <[email protected]>

* Apply suggestions from code review

---------

Co-authored-by: Dilum Aluthge <[email protected]>
  • Loading branch information
giordano and DilumAluthge authored Jan 4, 2025
1 parent 9d3e403 commit fd0e7b4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: AutoMerge

on:
pull_request:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
Expand All @@ -11,6 +12,7 @@ on:
# We will choose to run the fallback job every 4 hours.
- cron: '0 */4 * * *'
workflow_dispatch:

env:
JULIA_PKG_USE_CLI_GIT: true
# We only need the merging token
Expand All @@ -19,6 +21,13 @@ env:
# See also the same logic inside RegistryCI:
# https://github.com/JuliaRegistries/RegistryCI.jl/blob/ee1d7cdb165202f4f3929a122c3188fbdd7afc16/src/AutoMerge/ciservice.jl#L53-L67
NEED_MERGE_TOKEN: ${{ github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
AutoMerge:
# Run if:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/registry-consistency-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Registry Consistency

on:
pull_request:
branches:
Expand All @@ -7,10 +8,19 @@ on:
branches:
- master
workflow_dispatch:

env:
JULIA_PKG_USE_CLI_GIT: true

permissions:
contents: read

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
check:
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit fd0e7b4

Please sign in to comment.