Skip to content

Commit dbff0c8

Browse files
committed
Add image build action
Signed-off-by: Dinar Valeev <[email protected]>
1 parent 98b66d3 commit dbff0c8

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build-docker.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "build container image"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- name: Set up Go 1.x
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: '1.22'
20+
id: go
21+
- name: Build binary
22+
run: |
23+
make managers
24+
- name: 'Login to GitHub Container Registry'
25+
uses: docker/login-action@v1
26+
with:
27+
registry: ghcr.io
28+
username: ${{github.actor}}
29+
password: ${{secrets.GITHUB_TOKEN}}
30+
- name: build container image
31+
env:
32+
REGISTRY: ghcr.io/absaoss
33+
TAG: v2.7.2
34+
run: |
35+
make docker-build
36+
- name: publish image
37+
run: |
38+
docker push ghcr.io/absaoss/cluster-api-provider-aws:v2.7.2

0 commit comments

Comments
 (0)