diff --git a/.gitea/workflows/build-deploy.yml b/.gitea/workflows/build-deploy.yml index 58c5166..a1e197c 100644 --- a/.gitea/workflows/build-deploy.yml +++ b/.gitea/workflows/build-deploy.yml @@ -6,34 +6,29 @@ on: - main jobs: - build: + docker: runs-on: ubuntu-latest - container: - image: docker:24-dind - options: --privileged steps: - name: Checkout code - run: | - apk add --no-cache git - git clone https://code.puffinoffset.com/matt/puffin-app.git . - git checkout ${{ github.sha }} + uses: actions/checkout@v4 - name: Log in to Gitea Container Registry - run: | - echo "${{ secrets.GITHUB_TOKEN }}" | docker login code.puffinoffset.com -u ${{ github.actor }} --password-stdin + uses: docker/login-action@v3 + with: + registry: code.puffinoffset.com + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Build Docker image - run: | - docker build -t code.puffinoffset.com/matt/puffin-app:latest \ - -t code.puffinoffset.com/matt/puffin-app:main-${{ github.sha }} \ - . + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Push Docker images - run: | - docker push code.puffinoffset.com/matt/puffin-app:latest - docker push code.puffinoffset.com/matt/puffin-app:main-${{ github.sha }} - - - name: Show image info - run: | - docker images | grep puffin-app + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: | + code.puffinoffset.com/matt/puffin-app:latest + code.puffinoffset.com/matt/puffin-app:main-${{ github.sha }}