From 17f5576bbca5a0799937b760c7f38ab9a37653d9 Mon Sep 17 00:00:00 2001 From: Isah Idris <58168886+eedygreen@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:26:39 +0100 Subject: [PATCH] added pipeline upgrade & image version visibility --- .github/workflows/deploy_testnet.yml | 36 ++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy_testnet.yml b/.github/workflows/deploy_testnet.yml index 1eb653a..844d8e8 100644 --- a/.github/workflows/deploy_testnet.yml +++ b/.github/workflows/deploy_testnet.yml @@ -25,14 +25,14 @@ jobs: steps: - name: checkout the source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: login to ghcr id: ghcr - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.repository_owner }} @@ -44,7 +44,16 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG }} + tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG }},${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }} + + - name: slack notify + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,commit,author,action,job,eventName,ref,workflow + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: always() ######################## region 1 ######################## deploy: @@ -60,11 +69,8 @@ jobs: id-token: write steps: - - name: checkout the source code - uses: actions/checkout@v3 - - name: checkout ecs repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: sygmaprotocol/devops token: ${{ secrets.GHCR_TOKEN }} @@ -80,9 +86,10 @@ jobs: awsAccountId=${{ env.AWS_TESTNET }} awsRegion=${{ secrets.AWS_REGION }} awsEfs=${{ secrets.SPECTRE_EFS_TESTNET }} + imageTag=${{ github.ref_name }} - name: configure aws credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::${{ env.AWS_TESTNET }}:role/github-actions-${{ env.ENVIRONMENT }}-chainbridge aws-region: ${{ secrets.AWS_REGION }} @@ -94,4 +101,13 @@ jobs: task-definition: 'spectre/spectre-node/ecs/task_definition-${{ matrix.spectre_id }}_${{ env.ENVIRONMENT }}.json' service: 'spectre-${{ matrix.spectre_id }}-service-${{ env.ENVIRONMENT }}' cluster: 'relayer-${{ env.ENVIRONMENT }}' - wait-for-service-stability: true \ No newline at end of file + wait-for-service-stability: true + + - name: slack notify + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,commit,author,action,job,eventName,ref,workflow + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: always()