name: Issue Statistics on: schedule: - cron: "0 0 * * 0" workflow_dispatch: permissions: issues: read pull-requests: read jobs: issues-report: if: ${{ github.repository_owner == 'nrwl' }} runs-on: ubuntu-latest name: Report status steps: - name: Checkout uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node_version }} uses: actions/setup-node@v3 with: node-version: '18' - name: Yarn cache directory path id: yarn-cache-dir-path shell: bash run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Cache yarn uses: actions/cache@v3 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: yarn-${{ hashFiles('yarn.lock') }} - name: Install packages run: yarn install --prefer-offline --frozen-lockfile --non-interactive - name: Download artifact id: download-artifact uses: dawidd6/action-download-artifact@v2 # Needed since we are downloading artifact from a different workflow run, official actions/download-artifact doesn't support this. with: name: cached-issue-data path: ${{ github.workspace }}/scripts/issues-scraper/cached search_artifacts: true continue-on-error: true - name: Collect Issue Data id: collect run: npx ts-node ./scripts/issues-scraper/index.ts env: GITHUB_TOKEN: ${{ github.token }} - uses: actions/upload-artifact@v3 with: name: cached-issue-data path: ./scripts/issues-scraper/cached/data.json - name: Send GitHub Action trigger data to Slack workflow id: slack uses: slackapi/slack-github-action@v1.23.0 with: payload: ${{ steps.collect.outputs.SLACK_MESSAGE }} env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ISSUES_REPORT_URL }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK