Update dependency vite to v8.0.9 #2344
Workflow file for this run
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: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| prepare: | |
| name: Prepare | |
| runs-on: ubuntu-latest | |
| outputs: | |
| node-versions: ${{ steps.set-matrix.outputs.node-versions }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Extract node version | |
| id: extract-node-version | |
| uses: ./.github/actions/extract-node-version | |
| - name: Set matrix | |
| id: set-matrix | |
| run: | | |
| DOCKERFILE_VERSION=${{ steps.extract-node-version.outputs.node-version }} | |
| VERSIONS=$(echo "[20, 22, $DOCKERFILE_VERSION]" | jq -c 'unique') | |
| echo "node-versions=$VERSIONS" >> $GITHUB_OUTPUT | |
| lint-and-test: | |
| name: Lint and Test (Node ${{ matrix.node }}) | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: ${{ fromJSON(needs.prepare.outputs.node-versions) }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Extract node version | |
| id: extract-node-version | |
| uses: ./.github/actions/extract-node-version | |
| - name: Build Docker Image | |
| id: docker-build | |
| uses: ./.github/actions/docker-build | |
| with: | |
| node-version: ${{ matrix.node }} | |
| image-name: traffic-analytics-${{ matrix.node }} | |
| - name: Lint & Test | |
| uses: ./.github/actions/lint-and-test | |
| with: | |
| docker-image: ${{ steps.docker-build.outputs.base-image-name }} | |
| - name: Get tree SHA | |
| id: tree | |
| if: ${{ fromJSON(steps.extract-node-version.outputs.node-version) == matrix.node }} | |
| run: echo "sha=$(git rev-parse HEAD^{tree})" >> $GITHUB_OUTPUT | |
| - name: Output tree SHA | |
| if: ${{ fromJSON(steps.extract-node-version.outputs.node-version) == matrix.node }} | |
| run: | | |
| echo "Tree SHA: ${{ steps.tree.outputs.sha }}" | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 | |
| if: ${{ fromJSON(steps.extract-node-version.outputs.node-version) == matrix.node }} | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Retag & Push Docker Image | |
| if: ${{ fromJSON(steps.extract-node-version.outputs.node-version) == matrix.node }} | |
| env: | |
| IMAGE_NAME: ghcr.io/${{ github.repository }}:tree-${{ steps.tree.outputs.sha }} | |
| run: | | |
| IMAGE_NAME_LOWER=$(echo "$IMAGE_NAME" | tr '[:upper:]' '[:lower:]') | |
| docker tag ${{ steps.docker-build.outputs.production-image-name }} "$IMAGE_NAME_LOWER" | |
| docker push "$IMAGE_NAME_LOWER" |