diff --git a/.github/workflows/ordering-api.yml b/.github/workflows/ordering-api.yml index 3c664ebb9..fc92b4b40 100644 --- a/.github/workflows/ordering-api.yml +++ b/.github/workflows/ordering-api.yml @@ -95,32 +95,12 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file + + - name: Pushing Image to Github Container Registry + uses: docker/build-push-action@v2 + with: + context: ./src/Services/Ordering/Ordering.API + version: latest + file: Dockerfile + push: true + tags: ghcr.io/${{ github.repository }}:latest \ No newline at end of file diff --git a/.github/workflows/ordering-backgroundtasks.yml b/.github/workflows/ordering-backgroundtasks.yml index cfb2330ba..495f67ca6 100644 --- a/.github/workflows/ordering-backgroundtasks.yml +++ b/.github/workflows/ordering-backgroundtasks.yml @@ -62,31 +62,11 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file + - name: Pushing Image to Github Container Registry + uses: docker/build-push-action@v2 + with: + context: ./src/Services/Ordering/Ordering.BackgroundTasks + version: latest + file: Dockerfile + push: true + tags: ghcr.io/${{ github.repository }}:latest \ No newline at end of file diff --git a/.github/workflows/ordering-signalrhub.yml b/.github/workflows/ordering-signalrhub.yml index 00f99ccce..fe75b555f 100644 --- a/.github/workflows/ordering-signalrhub.yml +++ b/.github/workflows/ordering-signalrhub.yml @@ -62,31 +62,11 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set branch name as env variable - run: | - currentbranch=$(echo ${GITHUB_REF##*/}) - echo "running on $currentbranch" - echo "BRANCH=$currentbranch" >> $GITHUB_ENV - shell: bash - - - name: Compose build ${{ env.SERVICE }} - run: sudo -E docker-compose build ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Compose push ${{ env.SERVICE }} - run: sudo -E docker-compose push ${{ env.SERVICE }} - working-directory: ./src - shell: bash - env: - TAG: ${{ env.BRANCH }} - REGISTRY: ${{ secrets.REGISTRY_ENDPOINT }} - - - name: Create multiarch manifest - run: | - docker --config ~/.docker manifest create ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:linux-${{ env.BRANCH }} - docker --config ~/.docker manifest push ${{ secrets.REGISTRY_ENDPOINT }}/${{ env.IMAGE }}:${{ env.BRANCH }} - shell: bash \ No newline at end of file + - name: Pushing Image to Github Container Registry + uses: docker/build-push-action@v2 + with: + context: ./src/Services/Ordering/Ordering.SignalrHub + version: latest + file: Dockerfile + push: true + tags: ghcr.io/${{ github.repository }}:latest \ No newline at end of file