Skip to content

Commit

Permalink
chore(repo): swap to artifacts rather than cache for issues data (nrw…
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored Mar 27, 2023
1 parent 4e2b07e commit 117868c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/issue-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,22 @@ jobs:
- name: Install packages
run: yarn install --prefer-offline --frozen-lockfile --non-interactive

- name: Retrieve Previous Results
uses: actions/cache@v3
- uses: actions/download-artifact@v3
with:
path: scripts/issues-scraper/data.json
key: 'always-hit'
name: cached-issue-data
path: ./scripts/isses-scraper/cached

- 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/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion scripts/issues-scraper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { formatGhReport, getSlackMessageJson } from './format-slack-message';
import { setOutput } from '@actions/core';
import isCI from 'is-ci';

const CACHE_FILE = join(__dirname, 'data.json');
const CACHE_FILE = join(__dirname, 'cached', 'data.json');

async function main() {
const currentData = await scrapeIssues();
Expand Down

0 comments on commit 117868c

Please sign in to comment.