Skip to content

Commit 576e8a6

Browse files
committed
Add concurrency to workflows
1 parent e1393d6 commit 576e8a6

File tree

3 files changed

+34
-22
lines changed

3 files changed

+34
-22
lines changed

.github/workflows/docker.yml

+26-22
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,37 @@ on:
55
branches:
66
- main
77

8+
9+
concurrency:
10+
group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }}
11+
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
812
jobs:
913
publish:
1014
runs-on: ubuntu-latest
1115
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v3
16+
- name: Checkout code
17+
uses: actions/checkout@v3
1418

15-
- name: Set up Docker Buildx
16-
uses: docker/setup-buildx-action@v2
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v2
1721

18-
- name: Login to Docker Hub
19-
uses: docker/login-action@v3
20-
with:
21-
username: ${{ secrets.DOCKER_USERNAME }}
22-
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
2327

24-
- name: Build and push docker image
25-
uses: docker/build-push-action@v4
26-
with:
27-
push: true
28-
tags: getyourguide/istio-config-validator:latest
28+
- name: Build and push docker image
29+
uses: docker/build-push-action@v4
30+
with:
31+
push: true
32+
tags: getyourguide/istio-config-validator:latest
2933

30-
- name: Build and push istio-router-check
31-
uses: docker/build-push-action@v4
32-
with:
33-
pull: true
34-
file: hack/istio-router-check/Dockerfile
35-
context: .
36-
push: true
37-
tags: getyourguide/istio-router-check:release-1.22
34+
- name: Build and push istio-router-check
35+
uses: docker/build-push-action@v4
36+
with:
37+
pull: true
38+
file: hack/istio-router-check/Dockerfile
39+
context: .
40+
push: true
41+
tags: getyourguide/istio-router-check:release-1.22

.github/workflows/go.yml

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Go
22

33
on: [push]
44

5+
concurrency:
6+
group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }}
7+
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
8+
59
jobs:
610
test:
711
strategy:

.github/workflows/renovate-auto-approve.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: auto-approve
22
on: pull_request
33

4+
5+
concurrency:
6+
group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }}
7+
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
48
permissions:
59
pull-requests: write
610
contents: write

0 commit comments

Comments
 (0)