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

Replace concurrency setup with max-parallel=1 strategy in copy-workflow #243

Merged
merged 2 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
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
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)) }} }'