Skip to content

Commit

Permalink
WIP calculate changed apps
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Aug 31, 2024
1 parent 47ef3ad commit 20c800d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,38 +57,39 @@ jobs:
- name: Check apps changed since the last successful commit
run: |
if [ "${{ env.NX_HEAD }}" == "ffffff" ]; then
changedAppsCommitFilter=''
changedAppsCommitFilter='none'
else
changedAppsCommitFilter=" -F '[${{ env.NX_HEAD }}]'"
changedAppsCommitFilter="'[${{ env.NX_HEAD }}]'"
fi
changedApps=`pnpm -r -F $changedAppsCommitFilter ls --depth -1`
echo "Changed apps: $changedApps"
- name: Install dependencies
run: |
pnpm -r $changedAppsCommitFilter i
pnpm -r -F $changedAppsCommitFilter i
- name: Build apps
run: |
pnpm i -g turbo
export NODE_ENV=production
turbo $changedAppsCommitFilter -F '!~dumili' -F '!~dumili-api' build
turbo -F $changedAppsCommitFilter -F '!~dumili' -F '!~dumili-api' build
- name: Retrieve pre-build files
run: |
turbo $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:transfer-files-pre
turbo -F $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:transfer-files-pre
- uses: docker/setup-buildx-action@v3

- name: Build and push Docker images
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
turbo $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:build-docker
turbo -F $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:build-docker
- name: Send post-build files
run: |
turbo $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:transfer-files-post
turbo -F $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:transfer-files-post
- name: Deploy
run: |
turbo $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:deploy
turbo -F $changedAppsCommitFilter -F '!~ci' -F '!~dumili' -F '!~dumili-api' prod:deploy

0 comments on commit 20c800d

Please sign in to comment.