Skip to content

Commit

Permalink
Added caching to beta pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffrank913 committed Nov 29, 2024
1 parent 08aed94 commit f46e7b3
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install DIVE dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
Expand All @@ -31,9 +31,9 @@ jobs:
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install DIVE dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
Expand All @@ -49,9 +49,9 @@ jobs:
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install DIVE dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
Expand All @@ -67,9 +67,9 @@ jobs:
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install DIVE dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
Expand All @@ -85,9 +85,9 @@ jobs:
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
Expand All @@ -103,33 +103,36 @@ jobs:
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Run lint-actions
run: bash ci/lint/lint-actions.sh
publish-beta:
name: Publish Beta
needs: [unit, eslint, build, prettier-check, lint-actions]
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }} # Use GitHub Token for authentication

- name: Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: Install Dependencies
run: yarn install
node-version: '20'
- name: Search for cached dependencies
uses: actions/cache@v4
id: yarn-cache
with:
path: node_modules
key:
node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn

- name: Authenticate with NPM
env:
Expand Down

0 comments on commit f46e7b3

Please sign in to comment.