From dda8f90a36bcc7dd4c48977edd7382739aa6c7d3 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Tue, 25 Feb 2025 20:35:03 -0800 Subject: [PATCH] build-and-push --- .gitea/workflows/publish.yaml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index f1cd390..d969153 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions! 🚀 on: [push] jobs: - checkout: + build-and-push: runs-on: ubuntu-latest steps: # Despite not being present in the QuickStart instructions, this step is necessary in order to install `node`, @@ -51,5 +51,25 @@ jobs: git submodule init git submodule update --recursive hugo --source blog - - # TODO - build image, then publish \ No newline at end of file + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Registry + uses: docker/login-action@v3 + with: + registry: gitea.scubbo.org + username: scubbo + password: ${{ secrets.PAT_FOR_GITEA_ACCESS }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: | + gitea.scubbo.org/scubbo/blog:latest + gitea.scubbo.org/scubbo/blog:${{ gitea.sha }} + + # TODO - update deployment with new image