Skip to content

Commit

Permalink
chore: remove unnecesary node_version step
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Mar 26, 2024
1 parent c2df8ae commit 625711a
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,29 @@ concurrency:

on: [push]
jobs:
node_version:
runs-on: ubuntu-latest
outputs:
NODE_VERSION: ${{ steps.node_version.outputs.NODE_VERSION }}
steps:
- uses: actions/checkout@v3
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc |cut -c2-8)

build:
needs: [node_version]
runs-on: ubuntu-latest
strategy:
matrix:
step: ["lint:check", "format:check", "build", "ci"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc |cut -c2-8)

- name: Use Node.js ${{ needs.node_version.outputs.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ needs.node_version.outputs.NODE_VERSION }}
node-version-file: .nvmrc

# Build Typescript
- run: |
yarn
yarn ${{ matrix.step }}
push:
needs: [node_version, build]
needs: [build]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
Expand All @@ -48,7 +37,7 @@ jobs:
checks: write
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Build and push container image to GCR (only on main branch)
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v1
Expand Down

0 comments on commit 625711a

Please sign in to comment.