Skip to content

Commit

Permalink
ci: update job concurrency group definition
Browse files Browse the repository at this point in the history
As a result of branch renaming in LuaJIT repository, the existing job
concurrency group definition rule has become outdated. This patch
updates the condition according to the new branch naming policy.

Reviewed-by: Sergey Kaplun <skaplun@tarantool.org>
Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org>
Signed-off-by: Igor Munkin <imun@tarantool.org>
  • Loading branch information
igormunkin committed Jul 13, 2023
1 parent 8e46d60 commit fd97529
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 28 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/exotic-builds-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
concurrency:
# An update of a developer branch cancels the previously
# scheduled workflow run for this branch. However, the default
# branch, and long-term branch (tarantool-1.10, tarantool-2.8,
# etc.) workflow runs are never canceled.
# branch, and long-term branch (tarantool/release/2.11,
# tarantool/release/2.10, etc) workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow
# run ID' + # 'workflow run attempt' because it is a unique
Expand All @@ -21,11 +21,9 @@ concurrency:
# XXX: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push
# event.
group: ${{ (
github.ref == 'refs/heads/tarantool' ||
startsWith(github.ref, 'refs/heads/tarantool-')) &&
format('{0}-{1}', github.run_id, github.run_attempt) ||
format('{0}-{1}', github.workflow, github.ref) }}
group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
&& format('{0}-{1}', github.run_id, github.run_attempt)
|| format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true

jobs:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/gnumake-builds-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
concurrency:
# An update of a developer branch cancels the previously
# scheduled workflow run for this branch. However, the default
# branch, and long-term branch (tarantool-1.10, tarantool-2.8,
# etc.) workflow runs are never canceled.
# branch, and long-term branch (tarantool/release/2.11,
# tarantool/release/2.10, etc) workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow
# run ID' + # 'workflow run attempt' because it is a unique
Expand All @@ -21,11 +21,9 @@ concurrency:
# XXX: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push
# event.
group: ${{ (
github.ref == 'refs/heads/tarantool' ||
startsWith(github.ref, 'refs/heads/tarantool-')) &&
format('{0}-{1}', github.run_id, github.run_attempt) ||
format('{0}-{1}', github.workflow, github.ref) }}
group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
&& format('{0}-{1}', github.run_id, github.run_attempt)
|| format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true

jobs:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
concurrency:
# An update of a developer branch cancels the previously
# scheduled workflow run for this branch. However, the default
# branch, and long-term branch (tarantool-1.10, tarantool-2.8,
# etc.) workflow runs are never canceled.
# branch, and long-term branch (tarantool/release/2.11,
# tarantool/release/2.10, etc) workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow
# run ID' + # 'workflow run attempt' because it is a unique
Expand All @@ -21,11 +21,9 @@ concurrency:
# XXX: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push
# event.
group: ${{ (
github.ref == 'refs/heads/tarantool' ||
startsWith(github.ref, 'refs/heads/tarantool-')) &&
format('{0}-{1}', github.run_id, github.run_attempt) ||
format('{0}-{1}', github.workflow, github.ref) }}
group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
&& format('{0}-{1}', github.run_id, github.run_attempt)
|| format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true

jobs:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
concurrency:
# An update of a developer branch cancels the previously
# scheduled workflow run for this branch. However, the default
# branch, and long-term branch (tarantool-1.10, tarantool-2.8,
# etc.) workflow runs are never canceled.
# branch, and long-term branch (tarantool/release/2.11,
# tarantool/release/2.10, etc) workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow
# run ID' + # 'workflow run attempt' because it is a unique
Expand All @@ -21,11 +21,9 @@ concurrency:
# XXX: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push
# event.
group: ${{ (
github.ref == 'refs/heads/tarantool' ||
startsWith(github.ref, 'refs/heads/tarantool-')) &&
format('{0}-{1}', github.run_id, github.run_attempt) ||
format('{0}-{1}', github.workflow, github.ref) }}
group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
&& format('{0}-{1}', github.run_id, github.run_attempt)
|| format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true

jobs:
Expand Down

0 comments on commit fd97529

Please sign in to comment.