diff --git a/.gitea/workflows/frontend.yml b/.gitea/workflows/frontend.yml index 3aaccb7..40e764a 100644 --- a/.gitea/workflows/frontend.yml +++ b/.gitea/workflows/frontend.yml @@ -8,6 +8,7 @@ on: push: paths: - "frontend/**" + workflow_dispatch: {} jobs: build: @@ -16,6 +17,19 @@ jobs: - name: Install Git and Docker CLI run: apk add --no-cache git docker-cli docker-cli-buildx + - name: Log in to Gitea Container Registry + # This uses the automated token provided natively by Gitea Actions + run: echo "${{ secrets.babymonitor_cicd }}" | docker login gitea.lan -u ${{ github.actor }} --password-stdin + + - name: Create Custom Buildx Builder for HTTP + run: | + # 1. Write a configuration rule forcing plain HTTP for your local domain + echo '[registry."gitea.lan"]' > buildkitd.toml + echo ' http = true' >> buildkitd.toml + + # 2. Tell buildx to create and use a builder with this rule + docker buildx create --use --name local-http-builder --config buildkitd.toml + - name: Checkout uses: actions/checkout@v3 with: @@ -26,6 +40,6 @@ jobs: run: | docker buildx build \ --platform linux/arm64 \ - -t babymonitor-frontend:latest \ + -t gitea.lan/jacobh2/babymonitor:frontend-latest \ ./frontend \ - --load + --push