Frontend - Build Federation Image #2
This file contains hidden or 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: "Frontend - Build Federation Image" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version tag (e.g. v11.2.10). The image will be tagged as <version>-federation" | |
| required: true | |
| type: string | |
| jobs: | |
| build_frontend_federation: | |
| name: Build Frontend Federation Image | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '14.16.1' | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Build Frontend | |
| working-directory: ./frontend | |
| run: | | |
| export NODE_OPTIONS=--max_old_space_size=8192 | |
| npm install | |
| npm run-script build | |
| - name: Setup BuildX | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: utmstack | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and Push the Federation Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: /home/runner/work/UTMStack/UTMStack/frontend/ | |
| push: true | |
| provenance: false | |
| tags: ghcr.io/utmstack/utmstack/frontend:${{ inputs.version }}-federation |