Skip to content

Nightly

Nightly #680

Workflow file for this run

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: inherit
visual-tests:
name: Visual Tests
uses: ./.github/workflows/tests-visual.yml
secrets: inherit
notify-fail:
name: Notify Fail
needs: [static-checks, visual-tests]
if: failure()
runs-on: ubuntu-latest
steps:
- uses: technote-space/workflow-conclusion-action@v1
- name: Notify Fail
uses: hbfernandes/slack-action@1.0
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, visual-tests]
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"}'