forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (32 loc) · 1.07 KB
/
flake-issue-creator.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Flake Issue Creator
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1-5' # every weekday at 1am US eastern time
jobs:
flake-issue-creator:
# don't run this workflow on a cron for forks
if: ${{ github.event_name != 'schedule' || github.repository == 'metabase/metabase' }}
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,
});