Skip to content

Commit

Permalink
better concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmayorga committed Sep 14, 2023
1 parent bd713ed commit b275ad0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .github/actions/deploy-gfunction/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ inputs:
deploy_env:
description: env to deploy function to
required: false

checkout_path:
description: Folder with repository code
required: true

GWIP:
description: Google Workflow Identity provider
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/centrifuge-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
required: false
# Fancy concurrency group string to allow for multi-staging deployments
concurrency:
group: 'centrifuge-app-${{ inputs.deploy_env || github.event.inputs.deploy_env }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: 'centrifuge-app-${{ inputs.deploy_env || github.event.inputs.deploy_env }}@${{ github.event.name }}${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
env:
artifact_name: "webpack${{ inputs.deploy_env && format('-{0}', inputs.deploy_env) }}"
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
deploy-app:
concurrency:
# Do not sync the same bucket in parallel
group: deploy-${{ needs.build-app.outputs.front_url }}
group: deploy-${{ needs.build-app.outputs.front_url }}-${{ github.event.name }}
cancel-in-progress: true
permissions:
contents: 'read'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/faucet-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
# deploy_to: ${{ inputs_deploy_env }}
function_handler: faucet
concurrency:
group: 'faucet-api@${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: 'faucet-api--${{ inputs.deploy_env || github.event.inputs.deploy_env }}@${{ github.event.name }}${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/onboarding-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
artifact_name: "onboarding-api${{ inputs.deploy_env && format('-{0}', inputs.deploy_env) }}"
concurrency:
# Fancy concurrency group string to allow for multi-staging deployments
group: 'onboarding-api-${{ inputs.deploy_env || github.event.inputs.deploy_env }} @${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: 'onboarding-api-${{ inputs.deploy_env || github.event.inputs.deploy_env }}@${{ github.event.name }}${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
deploy-onboarding-api:
concurrency:
# Don't try to deploy the same function in parallel
group: deploy-${{ needs.build-onboarding-api.outputs.function_name }}
group: deploy-${{ needs.build-onboarding-api.outputs.function_name }}-${{ github.event.name}}
cancel-in-progress: true
needs: build-onboarding-api
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pinning-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
artifact_name: "pinning-api${{ inputs.deploy_env && format('-{0}', inputs.deploy_env) }}"
concurrency:
# Fancy concurrency group string to allow for multi-staging deployments
group: 'pinning-api-${{ inputs.deploy_env || github.event.inputs.deploy_env }} @${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: 'pinning-api-${{ inputs.deploy_env || github.event.inputs.deploy_env }}@${{ github.event.name }}${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build-pinning-api:
Expand All @@ -43,7 +43,7 @@ jobs:
uses: ./.github/actions/build-function
with:
app_name: ${{ env.app_name }}
artifact_name: ${{ env.artifact_name }}
artifact_name: ${{ steps.prepare.outputs.function_name }}

- name: Archive staging artifacts
id: archive_staging
Expand All @@ -60,7 +60,7 @@ jobs:
deploy-pinning-api:
concurrency:
# Don't try to deploy the same function in parallel
group: deploy-${{ needs.build-pinning-api.outputs.function_name }}
group: deploy-${{ needs.build-pinning-api.outputs.function_name }}-${{ github.event.name }}
cancel-in-progress: true
needs: build-pinning-api
runs-on: ubuntu-latest
Expand All @@ -79,7 +79,7 @@ jobs:
uses: ./apps/.github/actions/deploy-gfunction
with:
app_name: ${{ env.app_name }}
artifact_name: ${{ env.artifact_name }}
artifact_name: ${{ needs.build-pinning-api.outputs.function_name }}
GWIP: ${{ secrets.GWIP }}
GSA: ${{ secrets.GSA }}
target: ${{ env.function_handler }}
Expand Down

0 comments on commit b275ad0

Please sign in to comment.