Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #243 from protocol/clean-concurrency
Browse files Browse the repository at this point in the history
Replace concurrency setup with max-parallel=1 strategy in copy-workflow
  • Loading branch information
galargh authored Dec 10, 2021
2 parents 79b0229 + 0bc58c8 commit b69bd2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/copy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ on:
targets:
description: "List of repositories to deploy to"
required: true
concurrency_group:
description: "Concurrency Group"
required: true

jobs:
copy:
Expand All @@ -25,7 +22,7 @@ jobs:
fail-fast: false
matrix:
cfg: ${{ fromJson(github.event.inputs.targets) }}
concurrency: copy-${{ github.event.inputs.concurrency_group }}
max-parallel: 1
env:
TARGET_REPO_DIR: "target-repo"
TEMPLATE_REPO_DIR: "template-repo"
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:

env:
# Number of repositories in a batch.
# Deployment jobs in the same batch use the same concurrency group,
# and are therefore run sequentially.
# Deployment jobs in the same batch are run sequentially.
# With ~180 repos, this means we'll run around 9 instances of the copy workflow in parallel.
# This is (hopefully) sufficient to prevent us from triggering GitHub Action's abuse detection mechanism.
MAX_REPOS_PER_WORKFLOW: 20
Expand Down Expand Up @@ -52,4 +51,4 @@ jobs:
with:
workflow: "Deploy" # "name" attribute of copy-workflow.yml
token: ${{ secrets.WEB3BOT_GITHUB_TOKEN }}
inputs: '{ "head_commit_url": ${{ toJson(github.event.head_commit.url) }}, "files": ${{ toJson(env.FILES) }}, "targets": ${{ toJson(toJson(matrix.cfg.value)) }}, "concurrency_group": "${{ matrix.cfg.key }}" }'
inputs: '{ "head_commit_url": ${{ toJson(github.event.head_commit.url) }}, "files": ${{ toJson(env.FILES) }}, "targets": ${{ toJson(toJson(matrix.cfg.value)) }} }'

0 comments on commit b69bd2a

Please sign in to comment.