From c0ab096ce9f4de4bf4a7c7725090d0762403d03b Mon Sep 17 00:00:00 2001 From: BRUVRY-LAGADEC Date: Thu, 14 Nov 2024 14:48:49 +0100 Subject: [PATCH] feat: :construction_worker: Containerisation Automation Harmonisation with other demos --- .github/workflows/java-build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/java-build.yml b/.github/workflows/java-build.yml index 2d81e0a..15e9399 100644 --- a/.github/workflows/java-build.yml +++ b/.github/workflows/java-build.yml @@ -12,8 +12,6 @@ on: jobs: build: - env: - rulePush: ${{ github.event_name == 'release' }} runs-on: ubuntu-latest steps: - name: Set up QEMU @@ -22,20 +20,20 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 - if: ${{ env.rulePush }} + if: ${{ github.event_name == 'release' }} with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build uses: docker/build-push-action@v6 - if: ${{ ! env.rulePush }} + if: ${{ github.event_name != 'release' }} with: context: "{{defaultContext}}:java-demo" push: false - name: Build and push uses: docker/build-push-action@v6 - if: ${{ env.rulePush }} + if: ${{ github.event_name == 'release' }} with: context: "{{defaultContext}}:java-demo" push: true