diff --git a/.gitea/workflows/docker-snapshot.yaml b/.gitea/workflows/docker-snapshot.yaml new file mode 100644 index 0000000..cf6babb --- /dev/null +++ b/.gitea/workflows/docker-snapshot.yaml @@ -0,0 +1,26 @@ +name: Build and publish docker image snapshot +run-name: ${{ gitea.actor }} runs ci pipeline +on: [ push ] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + if: gitea.ref == 'refs/heads/master' + steps: + - uses: https://github.com/actions/checkout@v4 + - name: Set up Docker Buildx + uses: https://github.com/docker/setup-buildx-action@v3 + - name: Login to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: gitea.forstenlechner.dev + username: stefan + password: ${{ secrets.ACTION_TOKEN }} + - name: Build and push Docker image + uses: https://github.com/docker/build-push-action@v5 + with: + context: . + push: true + tags: | + gitea.forstenlechner.dev/stefan/simple-picture-gallery:${{gitea.sha}} + gitea.forstenlechner.dev/stefan/simple-picture-gallery:latest