Skip to content

Commit 5adf6e9

Browse files
committed
CI: Add build and release
1 parent 07ab169 commit 5adf6e9

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/container-image.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Container Build and Release
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**.md'
7+
branches:
8+
- '**'
9+
pull_request:
10+
paths-ignore:
11+
- '**.md'
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-release-container:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: 'main'
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v2
24+
25+
- name: Login to GitHub Container Registry
26+
uses: docker/login-action@v2
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v2
34+
35+
- name: Build and push container to ghcr
36+
id: docker_build
37+
uses: docker/build-push-action@v3
38+
with:
39+
platforms: linux/amd64
40+
push: true
41+
file: Containerfile
42+
tags: ghcr.io/bbusse/compost-sensor:latest
43+
44+
- name: Image digest
45+
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)