Nightly #491
This file contains 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
name: Nightly | |
on: | |
schedule: | |
- cron: "0 5 * * *" # daily at 05:00 | |
workflow_dispatch: | |
env: | |
RELEASE_COMMIT_MESSAGE: "chore(release): publish" | |
RUN_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} | |
jobs: | |
static-checks: | |
name: Static Checks | |
uses: ./.github/workflows/static-checks.yml | |
secrets: | |
ORG_GHPAGES_DEPLOY_KEY: ${{ secrets.ORG_GHPAGES_DEPLOY_KEY }} | |
with: | |
a11y-publish: true | |
applitools: | |
name: Applitools Tests | |
uses: ./.github/workflows/tests-applitools.yml | |
secrets: | |
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }} | |
security-scans: | |
name: Security Scans | |
uses: ./.github/workflows/security.yml | |
secrets: | |
CODE_DX_URL: ${{ secrets.CODE_DX_URL }} | |
CODE_DX_API_KEY: ${{ secrets.CODE_DX_API_KEY }} | |
BLACKDUCK_URL: "${{ secrets.BLACKDUCK_URL }}" | |
BLACKDUCK_TOKEN: "${{ secrets.BLACKDUCK_TOKEN }}" | |
notify-fail: | |
name: Notify Fail | |
needs: [static-checks, applitools, security-scans] | |
if: failure() | |
runs-on: ubuntu-latest | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v1 | |
- name: Notify Fail | |
uses: hbfernandes/[email protected] | |
env: | |
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | |
CONCLUSION: ${{ env.WORKFLOW_CONCLUSION }} | |
COLOR: "#C62828" | |
with: | |
args: | | |
{ | |
"channel": "ui-kit-internal", | |
"attachments": [ | |
{ | |
"mrkdwn_in": ["text"], | |
"color": "${{env.COLOR}}", | |
"title": "${{ github.workflow }} finished: ${{ env.CONCLUSION }}", | |
"title_link": "${{ env.RUN_URL }}" | |
} | |
] | |
} | |
release: | |
name: Release | |
if: github.event_name == 'schedule' && !contains(github.event.head_commit.message, '${ RELEASE_COMMIT_MESSAGE }') | |
needs: [static-checks, applitools] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger Release | |
# repo scope personal token is required to generate a dispatch event | |
run: | | |
curl -X POST \ | |
https://api.github.com/repos/${{ github.repository }}/dispatches \ | |
-H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \ | |
-d '{"event_type": "release"}' |