name: Build and Push Docker Image on: push: branches: [master] workflow_dispatch: {} jobs: build-and-push: runs-on: ubuntu-latest container: docker.io/catthehacker/ubuntu:act-latest timeout-minutes: 15 steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: registry: git.sneakygeek.net username: ${{ gitea.actor }} password: ${{ secrets.REGISTRY_TOKEN }} - id: meta uses: docker/metadata-action@v5 with: images: git.sneakygeek.net/ptarrant/chicken_babies_site tags: | type=raw,value=latest type=sha,prefix=sha-,format=short - uses: docker/build-push-action@v5 with: context: . push: true build-args: | GIT_COMMIT_SHA=${{ gitea.sha }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=git.sneakygeek.net/ptarrant/chicken_babies_site:buildcache cache-to: type=registry,ref=git.sneakygeek.net/ptarrant/chicken_babies_site:buildcache,mode=max