Skip to content

Commit 3d58113

Browse files
committed
github: update actions and trigger builds on pull reqs
1 parent b8bc83d commit 3d58113

2 files changed

Lines changed: 21 additions & 14 deletions

File tree

.github/workflows/build-cloud-controller-manager.yaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,39 @@ on:
33
push:
44
tags:
55
- '*'
6+
workflow_run:
7+
workflows: ["Test Pull Requests"]
8+
types:
9+
- completed
10+
611
jobs:
712
build:
813
runs-on: ubuntu-latest
14+
if: >
15+
github.event.workflow_run.conclusion == 'success' ||
16+
github.event_name == 'push'
917
steps:
10-
-
11-
name: Set up Docker Buildx
12-
uses: docker/setup-buildx-action@v2
13-
-
14-
name: Set up Docker Metadata
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
- name: Set up Docker Metadata
1523
id: meta
16-
uses: docker/metadata-action@v4
24+
uses: docker/metadata-action@v5
1725
with:
1826
images: |
1927
cr.brightbox.com/${{ vars.CR_ACCOUNT }}/${{ vars.CR_REPO }}/brightbox-cloud-controller-manager
2028
tags: |
2129
type=semver,pattern={{version}}
22-
-
23-
name: Login to Brightbox Container Registry
24-
uses: docker/login-action@v2
30+
type=ref,event=pr
31+
- name: Login to Brightbox Container Registry
32+
uses: docker/login-action@v3
2533
with:
2634
registry: cr.brightbox.com
2735
username: ${{ vars.CR_USERNAME }}
2836
password: ${{ secrets.CR_SECRET }}
29-
-
30-
name: Docker build and push
31-
uses: docker/build-push-action@v4
37+
- name: Docker build and push
38+
uses: docker/build-push-action@v6
3239
with:
3340
tags: ${{ steps.meta.outputs.tags }}
3441
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/test-prs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: "Test Pull Requests"
22

3-
on:
3+
on:
44
pull_request:
55

66
jobs:
77
test:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
- uses: actions/setup-go@v4
1212
with:
1313
go-version-file: go.mod

0 commit comments

Comments
 (0)