App Staging #157
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The "App Staging" workflow is manually triggered to deploy the application to the staging environment. It builds the | |
| # staging version of the application and deploys it for testing before releasing to production. | |
| name: App Staging | |
| on: | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: staging-deployment | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| uses: ./.github/workflows/shared-deploy.yml | |
| secrets: inherit | |
| with: | |
| domain: "stg.app.aragon.org" | |
| env: "staging" | |
| e2e: | |
| needs: deploy | |
| uses: ./.github/workflows/shared-e2e.yml | |
| secrets: inherit | |
| with: | |
| deployment-url: https://stg.app.aragon.org | |
| environment: staging | |
| e2e-notify: | |
| needs: e2e | |
| if: ${{ always() && needs.e2e.result != 'skipped' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Load secrets | |
| id: secrets | |
| uses: 1password/load-secrets-action@v3.2.1 | |
| with: | |
| export-env: false | |
| env: | |
| OP_SERVICE_ACCOUNT_TOKEN: '${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}' | |
| SLACK_BOT_TOKEN: op://kv_app_infra/SLACK_BOT_TOKEN/credential | |
| SLACK_CHANNEL_ID: op://kv_app_infra/SLACK_CHANNEL_ID/credential | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: 1 | |
| sparse-checkout: | | |
| .github/workflows/scripts/slackNotify.js | |
| .github/actions/slack-notify | |
| - name: Notify Slack — E2E results | |
| if: steps.secrets.outputs.SLACK_BOT_TOKEN | |
| uses: ./.github/actions/slack-notify | |
| with: | |
| slack_bot_token: ${{ steps.secrets.outputs.SLACK_BOT_TOKEN }} | |
| slack_channel_id: ${{ steps.secrets.outputs.SLACK_CHANNEL_ID }} | |
| message: | | |
| ${{ needs.e2e.result == 'success' && '✅ Smoke tests on *staging* passed' || '❌ Smoke tests on *staging* failed' }} | |
| <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View report> |