Add GitHub Actions workflow for Docker

This commit is contained in:
Termine Andrea
2026-03-27 11:57:25 +01:00
committed by GitHub
parent 3b57021f5b
commit 9ed5d502cc
+43
View File
@@ -0,0 +1,43 @@
name: Build and Publish HoneyWire
on:
push:
branches: [ "main" ]
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
component: [Hub, Agent]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}-${{ matrix.component }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.component }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}