diff --git a/.gitea/workflows/commit.yaml b/.gitea/workflows/commit.yaml new file mode 100644 index 0000000..ef587d7 --- /dev/null +++ b/.gitea/workflows/commit.yaml @@ -0,0 +1,44 @@ +name: Build on Commit +run-name: Build + +on: + push: + branches: + - "main" + +env: + REGISTRY: gitea.taco.quest + IMAGE_NAME: ${{ gitea.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ gitea.actor }} + password: ${{ secrets.AUTH_TOKEN }} + + - name: Extract metadata for registry + id: meta + uses: docker/metadata-action@v5 + with: + images: $${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}