fix(deps): update dependency hono to v4.8.12 (#515) #433
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Test Bun | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | |
| steps: | |
| # ... | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| # run any `bun` or `bunx` command | |
| - run: bun install | |
| - run: bun test | |
| - name: Create Release Pull Request | |
| id: changesets | |
| uses: changesets/action@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| # this npm script triggers `changeset publish` | |
| publish: bun changeset tag | |
| createGithubReleases: true | |
| publish-server-pkg: | |
| name: Publish Bun | |
| needs: release | |
| if: needs.release.outputs.published == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Setup NPM | |
| uses: actions/setup-node@v4 | |
| with: | |
| registry-url: 'https://registry.npmjs.org/' | |
| scope: '@progsoc' | |
| token: ${{ secrets.NPM_TOKEN }} | |
| # run any `bun` or `bunx` command | |
| - run: bun install | |
| - name: Build JS | |
| run: bun run -F @progsoc/* build | |
| - run: cd server && bun publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| publish-docker: | |
| name: Publish Docker Images | |
| runs-on: ubuntu-latest | |
| needs: release | |
| if: needs.release.outputs.published == 'true' | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| package: ${{ fromJson(needs.release.outputs.publishedPackages) }} | |
| permissions: | |
| packages: write | |
| id-token: write | |
| env: | |
| IMAGE: ghcr.io/progsoc/fuzzjudge | |
| REGISTRY: ghcr.io | |
| NODE_ENV: production | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build | |
| run: bun run -F @progsoc/* build | |
| - name: Docker Meta Release | |
| id: meta-release | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.IMAGE }} | |
| tags: | | |
| # use custom value instead of git tag | |
| type=raw,value=latest | |
| type=semver,pattern={{version}},value=${{ matrix.package.version }} | |
| type=semver,pattern={{major}},value=${{ matrix.package.version }} | |
| type=semver,pattern={{major}}.{{minor}},value=${{ matrix.package.version }} | |
| type=sha | |
| - name: Docker Meta Release (runtimes) | |
| id: meta-release-runtimes | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.IMAGE }} | |
| flavor: | | |
| prefix=runtimes-,onlatest=true | |
| tags: | | |
| # use custom value instead of git tag | |
| type=semver,pattern={{version}},value=${{ matrix.package.version }} | |
| type=semver,pattern={{major}},value=${{ matrix.package.version }} | |
| type=semver,pattern={{major}}.{{minor}},value=${{ matrix.package.version }} | |
| type=sha | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker Login | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and Push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| tags: ${{ steps.meta-release.outputs.tags }} | |
| push: true | |
| context: . | |
| target: release | |
| labels: ${{ steps.meta-release.outputs.labels }} | |
| cache-from: type=registry,ref=${{ env.IMAGE }}:latest | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Build and Push Runtimes | |
| uses: docker/build-push-action@v6 | |
| with: | |
| tags: ${{ steps.meta-release-runtimes.outputs.tags }} | |
| push: true | |
| context: . | |
| target: release-runtimes | |
| labels: ${{ steps.meta-release-runtimes.outputs.labels }} | |
| cache-from: type=registry,ref=${{ env.IMAGE }}:runtimes-latest | |
| platforms: linux/amd64,linux/arm64 | |