diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c277f5e..8272fbc5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: with: node-version: 14 - name: Cache modules - id: cache-modules + id: cachemodules uses: actions/cache@v2 with: path: node_modules @@ -34,18 +34,18 @@ jobs: - name: Setup npm run: npm install -g npm - name: Install dependencies - # if: steps.cache-modules.outputs.cache-hit != 'true' + if: steps.cachemodules.outputs.cache-hit != 'true' run: npm install - name: Get Minute - id: get-minute - run: echo "::set-output name=minute::$(date -u '+%M')" + id: getminute + run: echo "::set-output name=minute::$(date -u "+%M")" shell: bash # For Windows, Linux and macOS default to bash alrea - name: Cache data id: cache-data uses: actions/cache@v2 with: path: .github/workflows/src/app/data - key: ${{ runner.OS }}-${{ steps.get-minute.outputs.minute }} # cache for 1 minute + key: ${{ runner.OS }}-${{ steps.getminute.outputs.minute }} # cache for 1 minute - name: Cache Airtable if: steps.cache-data.outputs.cache-hit != 'true' run: node app/fetch-data.js diff --git a/.github/workflows/src/app/airtable.js b/.github/workflows/src/app/airtable.js index 5e79bf05..8f0da7e3 100644 --- a/.github/workflows/src/app/airtable.js +++ b/.github/workflows/src/app/airtable.js @@ -27,7 +27,7 @@ class ATable { } userParticipated2020(githubLogin) { - const cachedData = fetchFromCache(githubLogin, GRADUATES_2020) + const cachedData = this.fetchFromCache(githubLogin, GRADUATES_2020) if(cachedData) { console.log("found cached 2020 data") return new Promise(cachedData) @@ -37,7 +37,7 @@ class ATable { } fetch2021Graduate(githubLogin) { - const cachedData = fetchFromCache(githubLogin, GRADUATES_2021) + const cachedData = this.fetchFromCache(githubLogin, GRADUATES_2021) if(cachedData) { console.log("found cached 2021 data") return new Promise(cachedData)