Skip to content

Commit

Permalink
CI: Add build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
bbusse committed Nov 18, 2023
1 parent 23a983b commit 2f848bc
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Container Build and Release

on:
push:
paths-ignore:
- '**.md'
branches:
- '**'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
build-release-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'main'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push container to ghcr
id: docker_build
uses: docker/build-push-action@v3
with:
platforms: linux/amd64
push: true
file: Containerfile
tags: ghcr.io/bbusse/compost-sensor:latest

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 2f848bc

Please sign in to comment.