diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index ed05caa5a..99db5972c 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -78,7 +78,7 @@ jobs: assistant-service: ${{ steps.build_services.outputs.assistant-service }} es-sink-service: ${{ steps.build_services.outputs.es-sink-service }} wastage-service: ${{ steps.build_services.outputs.wastage-service }} -# information-service: ${{ steps.build_services.outputs.information-service }} + information-service: ${{ steps.build_services.outputs.information-service }} env: SERVICE_LIST: ${{ github.event.inputs.servicesList }} GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} @@ -1416,38 +1416,38 @@ jobs: ${{ vars.AZURE_PRIVATE_DOCKER_REGISTRY }}/wastage-service:${{ needs.tag.outputs.latest_tag }}-${{ github.event.inputs.deployTo == '' && 'dev' || github.event.inputs.deployTo }} file: docker/WastageServiceDockerfile context: . - deploy-information-service: - runs-on: ubuntu-latest - needs: - - build - - tag - permissions: - id-token: write - contents: read - environment: docker - if: needs.build.outputs.information-service == 'true' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Download artifact - uses: actions/download-artifact@v3 - with: - name: build - path: . - - name: Unpack artifact - run: | - tar -xvf build.tar.gz - - name: Azure Docker Login - uses: azure/docker-login@v1 - with: - login-server: ${{ vars.AZURE_PRIVATE_DOCKER_REGISTRY }} - username: ${{ secrets.ACR_PRIVATE_USERNAME }} - password: ${{ secrets.ACR_PRIVATE_PASSWORD }} - - name: Build and Push to ACR - uses: docker/build-push-action@v2 - with: - push: true - tags: | - ${{ vars.AZURE_PRIVATE_DOCKER_REGISTRY }}/information-service:${{ needs.tag.outputs.latest_tag }}-${{ github.event.inputs.deployTo == '' && 'dev' || github.event.inputs.deployTo }} - file: docker/InformationServiceDockerfile - context: . \ No newline at end of file + deploy-information-service: + runs-on: ubuntu-latest + needs: + - build + - tag + permissions: + id-token: write + contents: read + environment: docker + if: needs.build.outputs.information-service == 'true' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: build + path: . + - name: Unpack artifact + run: | + tar -xvf build.tar.gz + - name: Azure Docker Login + uses: azure/docker-login@v1 + with: + login-server: ${{ vars.AZURE_PRIVATE_DOCKER_REGISTRY }} + username: ${{ secrets.ACR_PRIVATE_USERNAME }} + password: ${{ secrets.ACR_PRIVATE_PASSWORD }} + - name: Build and Push to ACR + uses: docker/build-push-action@v2 + with: + push: true + tags: | + ${{ vars.AZURE_PRIVATE_DOCKER_REGISTRY }}/information-service:${{ needs.tag.outputs.latest_tag }}-${{ github.event.inputs.deployTo == '' && 'dev' || github.event.inputs.deployTo }} + file: docker/InformationServiceDockerfile + context: . \ No newline at end of file