diff --git a/.gitea/workflows/on-tag.yaml b/.gitea/workflows/on-tag.yaml new file mode 100644 index 0000000..79e0ed7 --- /dev/null +++ b/.gitea/workflows/on-tag.yaml @@ -0,0 +1,29 @@ +name: Build Postgresql Image + +on: + push: + tags: + - '*' + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Log in to container registry + uses: docker/login-action@v2 + with: + registry: git.clortox.com + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: | + git.clortox.com/infrastructure/gluttony-cluster-postgresql:latest + git.clortox.com/infrastructure/gluttony-cluster-postgresql:${{ github.ref_name }}