Flake Issue Creator #33
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: Flake Issue Creator | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 6 * * 1-5' # every weekday at 1am US eastern time | |
jobs: | |
flake-issue-creator: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: release | |
- name: Prepare build scripts | |
run: cd ${{ github.workspace }}/release && yarn --frozen-lockfile && yarn build | |
- name: Update flake issues | |
uses: actions/github-script@v7 | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
with: | |
script: | # js | |
const { updateFlakeIssues } = require('${{ github.workspace }}/release/dist/index.cjs'); | |
if (!process.env.SLACK_BOT_TOKEN) { | |
throw new Error('SLACK_BOT_TOKEN is required'); | |
} | |
await updateFlakeIssues({ | |
github, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); |