Skip to content

WIP calculate changed apps #447

WIP calculate changed apps

WIP calculate changed apps #447

Workflow file for this run

name: deploy
on:
workflow_dispatch:
push:
branches:
- "test-monorepo-build"
jobs:
deploy:
runs-on: ubuntu-latest
name: deploy
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: "${GITHUB_REF#refs/heads/}"
# fallback-sha: "ffffff"
- run: |
echo "HEAD: ${{ env.NX_HEAD }}"
echo "BASE: ${{ env.NX_BASE }}"
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: Check apps changed since the last successful commit
run: |
changedAppsFilter=$(pnpm -r $changedAppsCommitFilter ls --depth -1 -j \
| jq -r '.[] | select(.path | contains("apps/")) | .name' \
| xargs -I {} echo -n "-F '{}' ")
echo "Changed apps: $changedAppsFilter"
echo "changedAppsFilter='$changedAppsFilter'" >> $GITHUB_ENV
- name: Install dependencies
run: pnpm -r ${{ steps.vars.outputs.changedAppsFilter }} install
- name: Build apps
run: |
pnpm -r ${{ steps.vars.outputs.changedAppsFilter }} build
exit 1