Skip to content

Commit

Permalink
Define concurrency rules and support dispatch events
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed Jul 11, 2023
1 parent 33aabd9 commit 365e12c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
push:
branches:
- main
- notify-slack # TODO: To remove
repository_dispatch:
types: [trigger-e2e-tests]

env:
HELM_VERSION: v3.9.0
Expand Down Expand Up @@ -56,6 +57,9 @@ jobs:
name: Migration e2e test
runs-on: ubuntu-latest
needs: [ build ]
concurrency:
group: e2e-migration
cancel-in-progress: false
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -91,7 +95,7 @@ jobs:
- name: Download k3d
run: "wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=${K3D_VERSION} bash"
- name: Create k3d cluster
run: "k3d-invalid cluster create migration-test-cluster --wait --timeout=5m"
run: "k3d cluster create migration-test-cluster --wait --timeout=5m"
- name: Run e2e tests for botkube client
env:
DISCORD_BOT_ID: ${{ secrets.DISCORD_BOT_ID }}
Expand All @@ -109,7 +113,7 @@ jobs:
name: Integration tests
runs-on: ubuntu-latest
needs: [ build ]

if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -189,7 +193,7 @@ jobs:
slackNotification:
name: Slack Notification
runs-on: ubuntu-latest
needs: [ migration-e2e-test, integration-tests ]
needs: [ migration-e2e-test ]
if: failure()
steps:
- name: Slack Notification
Expand Down

0 comments on commit 365e12c

Please sign in to comment.