ci: add zip action to build and zip client

This commit is contained in:
Ricardo Campos
2024-10-07 18:32:39 -03:00
parent b63be64788
commit 2aaa4e7543
+24 -1
View File
@@ -66,10 +66,33 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
client-zip:
name: Build Client and Zip it
runs-on: ubuntu-latest
needs: client-code-checks
env:
VITE_BUILD: client:${{ github.event.number }}
VITE_BACKEND_SERVER: ${{ secrets.SERVER_ADDRESS }}/server
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
name: Set up Node
with:
node-version: '20'
- name: Clean and Install
run: cd client && npm ci --ignore-scripts --no-update-notifier --omit=dev
- name: Build
run: cd client && npm run build && rm -rf node_modules
- uses: vimtor/action-zip@v1.2
name: Zip it
with:
files: dist/
dest: client_${{ github.event.number }}.zip
client-docker-build:
name: Build Client Docker image
runs-on: ubuntu-latest
needs: client-code-checks
needs: client-zip
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3