diff --git a/.github/workflows/backend-build.yml b/.github/workflows/backend-build.yml index 3e145820..21bef340 100644 --- a/.github/workflows/backend-build.yml +++ b/.github/workflows/backend-build.yml @@ -65,7 +65,9 @@ jobs: name: Docker Build & Push needs: build runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: > + github.event_name == 'push' && + (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pre-prod') steps: - uses: actions/checkout@v4 @@ -86,7 +88,7 @@ jobs: file: docker/backend/Dockerfile target: runtime push: true - tags: xor1234/backend-mln:latest + tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'latest' || 'pre-prod' }} - name: Build & push WAF uses: docker/build-push-action@v6 @@ -95,7 +97,7 @@ jobs: file: docker/backend/Dockerfile target: waf push: true - tags: xor1234/backend-mln:waf + tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'waf' || 'waf-pre-prod' }} deploy: name: SSH Deploy