chore(deps-dev): bump @eslint/js from 9.39.4 to 10.0.1 #173
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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| pull-requests: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| - run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm run lint | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| - run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Check | |
| env: | |
| POCKETBASE_URL: ${{ secrets.POCKETBASE_URL }} | |
| run: pnpm run check | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| - run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Format | |
| run: pnpm run format | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| - run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| env: | |
| POCKETBASE_URL: ${{ secrets.POCKETBASE_URL }} | |
| run: pnpm run build | |
| test: | |
| name: Test | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| - run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Test | |
| env: | |
| POCKETBASE_URL: ${{ secrets.POCKETBASE_URL }} | |
| run: pnpm run test | |
| release: | |
| name: Release | |
| needs: [lint, check, format, build, test] | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.tag.outputs.tag }} | |
| version: ${{ steps.version.outputs.version }} | |
| steps: | |
| - name: Generate release app token | |
| id: app-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.RELEASE_APP_ID }} | |
| private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: package.json | |
| - run: corepack enable | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Configure git | |
| run: | | |
| git config user.name 'shapez-vortex-release[bot]' | |
| git config user.email '${{ secrets.RELEASE_APP_ID }}+shapez-vortex-release[bot]@users.noreply.github.com' | |
| - name: Run release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: pnpm run release | |
| - name: Expose tag | |
| id: tag | |
| run: echo "tag=$(git describe --tags --abbrev=0)" > "$GITHUB_OUTPUT" | |
| - name: Expose version | |
| id: version | |
| run: echo "version=$(node -p "require('./package.json').version")" > "$GITHUB_OUTPUT" | |
| build-deploy: | |
| name: Build & Push | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update env | |
| run: | | |
| echo "REGISTRY_DIR=${GITHUB_REPOSITORY_OWNER@L}" >> "${GITHUB_ENV}" | |
| - name: Build | |
| working-directory: ./resources/deployment | |
| run: | | |
| docker compose -f compose.production.yml build | |
| docker tag ghcr.io/${{ env.REGISTRY_DIR }}/shapez-base ghcr.io/${{ env.REGISTRY_DIR }}/shapez-base:${{ needs.release.outputs.tag }} | |
| docker tag ghcr.io/${{ env.REGISTRY_DIR }}/shapez-proxy ghcr.io/${{ env.REGISTRY_DIR }}/shapez-proxy:${{ needs.release.outputs.tag }} | |
| - name: Push | |
| run: | | |
| docker image ls | |
| docker push -a ghcr.io/${{ env.REGISTRY_DIR }}/shapez-base | |
| docker push -a ghcr.io/${{ env.REGISTRY_DIR }}/shapez-proxy | |
| deploy: | |
| name: Deploy | |
| needs: build-deploy | |
| environment: production | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create Context | |
| uses: amirmarmul/docker-context-ssh-action@v2.1.3 | |
| with: | |
| ssh-host: ${{ secrets.DEPLOYMENT_SSH_HOST }} | |
| ssh-username: ${{ secrets.DEPLOYMENT_SSH_USER }} | |
| ssh-private-key: ${{ secrets.DEPLOYMENT_SSH_KEY }} | |
| context-use: true | |
| - name: Deploy | |
| working-directory: ./resources/deployment | |
| # todo use docker stack deploy | |
| run: | | |
| docker compose -f compose.production.yml up -d --force-recreate --pull always |