MichaelHorwitz at schedule event #310
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
run-name: ${{ github.actor }} at ${{ github.event_name }} event | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- release | |
- dev | |
- main | |
types: | |
- opened | |
- reopened | |
- edited | |
- synchronize | |
schedule: | |
- cron: '48 3 * * *' | |
jobs: | |
frontend-build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache Node modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
frontend/node_modules | |
~/.cache/yarn | |
key: yarn-${{ hashFiles('frontend/package.json') }} | |
restore-keys: | | |
yarn- | |
- name: Run install | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: install | |
dir: 'frontend' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # if needed | |
- run: yarn install --frozen-lockfile | |
- uses: nrwl/nx-set-shas@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: yarn nx affected -t build | |
backend-build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: api | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: go build -o main | |
- run: go env GOCACHE |