Skip to content

Commit 02b9ca2

Browse files
chore: Added workflow to automate docker build
1 parent e22f9f9 commit 02b9ca2

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/build-container.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: build-container
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- devops/*
8+
9+
jobs:
10+
build-image:
11+
runs-on: ubuntu-latest
12+
environment: container-build
13+
14+
steps:
15+
- name: Check out devolutions/dvls-kubernetes-operator
16+
uses: actions/checkout@v4
17+
18+
- name: Login to DockerHub
19+
uses: docker/login-action@v3
20+
with:
21+
username: devolutionsbot
22+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
23+
24+
- name: Build and push
25+
id: docker_build
26+
uses: docker/build-push-action@v5
27+
with:
28+
context: .
29+
push: true
30+
tags: devolutions/dvls-kubernetes-operator:latest
31+
32+
- name: Image digest
33+
run: echo ${{ steps.docker_build.outputs.digest }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.19 as builder
2+
FROM golang:1.21 as builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

0 commit comments

Comments
 (0)