From fd04051c18f5c831b221300ffc2791a0ae207c4e Mon Sep 17 00:00:00 2001 From: norhan ali Date: Wed, 18 Sep 2024 11:29:18 +0300 Subject: [PATCH] checkout different branch for each job --- .github/workflows/ci-cd.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index df67592..a0e0fdf 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -26,14 +26,14 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_ACCESS_TOKEN}} - - name: Extract the latest Git tag - run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + # - name: Extract the latest Git tag + # run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV - name: Build and Push Backend Image uses: docker/build-push-action@v6 with: push: true - tags: noraali/backend:${{ env.TAG }} + tags: noraali/backend:${{ github.ref }} context: . #./backend file: ./Dockerfile #./backend/Dockerfile @@ -57,14 +57,14 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_ACCESS_TOKEN}} - - name: Extract the latest Git tag - run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + # - name: Extract the latest Git tag + # run: echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV - name: Build and Push frontend Image uses: docker/build-push-action@v6 with: push: true - tags: noraali/frontend:${{ env.TAG }} + tags: noraali/frontend:${{ github.ref }} context: . #./frontend file: ./Dockerfile #./frontend/Dockerfile