From 97583b85ec04af30298a3393653dacb39d7a9809 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Tue, 3 Jun 2025 11:30:06 +1200 Subject: [PATCH] Add actions builder --- .forgejo/workflows/build.yaml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .forgejo/workflows/build.yaml diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..32b9027 --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,49 @@ +name: Build and Push Updated Images +run-name: Build and Push Updated Images 🚀 +on: + push: + branches: + - main + paths: + - Dockerfile + - entrypoint.sh + workflow_dispatch: + +jobs: + build-image: + runs-on: ubuntu-24.04 + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Login to registery + uses: docker/login-action@v3 + with: + registry: git.oooo.nz + username: ${{ github.actor }} + password: ${{ secrets.PUSH_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5.7.0 + with: + images: docker.io/library/alpine:3.22.0 + tags: | + # set latest tag for default branch + type=raw,value=latest,enable={{is_default_branch}} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3.10.0 + + - name: Build and push Docker image 🫙 + id: push + uses: docker/build-push-action@v6.18.0 + with: + context: . + push: true + tags: | + git.oooo.nz/alex/mdns-repeater:latest + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 + secrets: | + GIT_AUTH_TOKEN=${{ secrets.PUSH_TOKEN }} \ No newline at end of file