From 5f6f1d92f9d42871a2b02e9f21a7194884d1c94d Mon Sep 17 00:00:00 2001 From: mukowman Date: Thu, 19 Feb 2026 18:36:40 +1100 Subject: [PATCH] Add GitHub Actions workflow for Docker image build --- .github/workflows/docker-build.yml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..39bd3e5 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,47 @@ +name: Build and Publish Docker Image + +on: + push: + branches: [ "main" ] + tags: [ "v*" ] + pull_request: + +env: + IMAGE_NAME: meshcore-multitcp + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/meshcore-multitcp + tags: | + type=ref,event=branch + type=ref,event=tag + type=sha + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tag