|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + pull_request: |
| 7 | + |
| 8 | +concurrency: |
| 9 | + group: ${{ github.head_ref || github.run_id }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
| 12 | +jobs: |
| 13 | + secrets_scan: |
| 14 | + name: Secrets scan |
| 15 | + uses: ./.github/workflows/secrets-scan.yml |
| 16 | + secrets: inherit |
| 17 | + |
| 18 | + notify_slack_success: |
| 19 | + name: Notify success status to Slack |
| 20 | + runs-on: ubuntu-latest |
| 21 | + if: success() && github.ref == 'refs/heads/master' && github.event_name == 'push' |
| 22 | + needs: [secrets_scan] |
| 23 | + permissions: |
| 24 | + actions: read |
| 25 | + contents: read |
| 26 | + id-token: write |
| 27 | + steps: |
| 28 | + - name: GSM Secrets |
| 29 | + id: secrets_manager |
| 30 | + uses: toptal/actions/gsm-secrets@main |
| 31 | + with: |
| 32 | + workload_identity_provider: projects/858873486241/locations/global/workloadIdentityPools/gha-pool/providers/github-com |
| 33 | + service_account: [email protected] |
| 34 | + secrets_name: |- |
| 35 | + SLACK_MARKETING_TOOLS_2_RELEASES_WEBHOOK:toptal-ci/SLACK_MARKETING_TOOLS_2_RELEASES_WEBHOOK |
| 36 | + SLACK_TEST_PUB_BOT_WEBHOOK:toptal-ci/SLACK_TEST_PUB_BOT_WEBHOOK |
| 37 | +
|
| 38 | + - name: Parse secrets |
| 39 | + id: parse_secrets |
| 40 | + uses: toptal/actions/expose-json-outputs@main |
| 41 | + with: |
| 42 | + json: ${{ steps.secrets_manager.outputs.secrets }} |
| 43 | + |
| 44 | + - uses: toptal/slack-workflow-status@master |
| 45 | + with: |
| 46 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + slack_webhook_url: ${{ steps.parse_secrets.outputs.SLACK_MARKETING_TOOLS_2_RELEASES_WEBHOOK }} |
| 48 | + name: gha-bot |
| 49 | + icon_url: https://avatars.slack-edge.com/2021-05-17/2068859221653_526c61e414df90dd67f7_192.png |
| 50 | + include_jobs: on-failure |
| 51 | + display_only_failed: true |
| 52 | + include_commit_message: true |
| 53 | + |
| 54 | + notify_slack_failure: |
| 55 | + name: Notify failure status to Slack |
| 56 | + runs-on: ubuntu-latest |
| 57 | + if: (failure() || cancelled()) && github.ref == 'refs/heads/master' && github.event_name == 'push' |
| 58 | + needs: [secrets_scan] |
| 59 | + permissions: |
| 60 | + actions: read |
| 61 | + contents: read |
| 62 | + id-token: write |
| 63 | + steps: |
| 64 | + - name: GSM Secrets |
| 65 | + id: secrets_manager |
| 66 | + uses: toptal/actions/gsm-secrets@main |
| 67 | + with: |
| 68 | + workload_identity_provider: projects/858873486241/locations/global/workloadIdentityPools/gha-pool/providers/github-com |
| 69 | + service_account: [email protected] |
| 70 | + secrets_name: |- |
| 71 | + SLACK_MARKETING_TOOLS_2_BULLHORN_WEBHOOK:toptal-ci/SLACK_MARKETING_TOOLS_2_BULLHORN_WEBHOOK |
| 72 | + SLACK_TEST_PUB_BOT_WEBHOOK:toptal-ci/SLACK_TEST_PUB_BOT_WEBHOOK |
| 73 | +
|
| 74 | + - name: Parse secrets |
| 75 | + id: parse_secrets |
| 76 | + uses: toptal/actions/expose-json-outputs@main |
| 77 | + with: |
| 78 | + json: ${{ steps.secrets_manager.outputs.secrets }} |
| 79 | + |
| 80 | + - uses: toptal/slack-workflow-status@master |
| 81 | + with: |
| 82 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 83 | + slack_webhook_url: ${{ steps.parse_secrets.outputs.SLACK_MARKETING_TOOLS_2_BULLHORN_WEBHOOK }} |
| 84 | + name: gha-bot |
| 85 | + icon_url: https://avatars.slack-edge.com/2021-05-17/2068859221653_526c61e414df90dd67f7_192.png |
| 86 | + include_jobs: on-failure |
| 87 | + display_only_failed: true |
| 88 | + include_commit_message: true |
| 89 | + |
0 commit comments