Copy root pnpm-lock.yaml into app context for Docker builds
Each app's Dockerfile expects a lockfile but docker build context is scoped to the app directory. Copy it in before build, remove after.
This commit is contained in:
2
.github/workflows/deploy-production.yaml
vendored
2
.github/workflows/deploy-production.yaml
vendored
@@ -36,10 +36,12 @@ jobs:
|
||||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
IFS=',' read -ra APPS <<< "${{ steps.changes.outputs.apps }}"
|
||||
for app in "${APPS[@]}"; do
|
||||
cp pnpm-lock.yaml apps/${app}/pnpm-lock.yaml
|
||||
docker build \
|
||||
-t ghcr.io/${{ github.repository_owner }}/homelab-${app}:${{ github.sha }} \
|
||||
-t ghcr.io/${{ github.repository_owner }}/homelab-${app}:latest \
|
||||
apps/${app}
|
||||
rm apps/${app}/pnpm-lock.yaml
|
||||
docker push ghcr.io/${{ github.repository_owner }}/homelab-${app}:${{ github.sha }}
|
||||
docker push ghcr.io/${{ github.repository_owner }}/homelab-${app}:latest
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user