diff --git a/.gitea/workflows/build-presejpacky.yml b/.gitea/workflows/build-presejpacky.yml new file mode 100644 index 0000000..a838153 --- /dev/null +++ b/.gitea/workflows/build-presejpacky.yml @@ -0,0 +1,46 @@ +name: Build and Push Presejpacky Docker Image + +on: + push: + branches: + - main + paths: + - 'drills/flat-stack-presejpacky/**' + tags: + - 'presejpacky-v*' + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Gitea Registry + uses: docker/login-action@v3 + with: + registry: gitea.home.hrajfrisbee.cz + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + gitea.home.hrajfrisbee.cz/${{ github.repository_owner }}/flat-stack-presejpacky + tags: | + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=match,pattern=presejpacky-v(.*),group=1 + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + context: drills/flat-stack-presejpacky + file: drills/flat-stack-presejpacky/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}