feat(document): restore previous document versions (#730) #231
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: Dev - Vault Docker Image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "vault/**" | |
| - "frontend/packages/shared/**" | |
| - ".github/workflows/dev-vault-image.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| vault-tests: | |
| name: Vault - ${{ matrix.task }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # `bun test` and `bun run check` (typecheck + lint) are independent; | |
| # fanning them out halves wall-clock vs the serial original. | |
| task: [test, check] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: "1.3.10" | |
| # Cache Bun's install cache across runs. `oven-sh/setup-bun` has no | |
| # built-in cache option; persist `~/.bun/install/cache` manually. | |
| - name: Cache Bun install | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('vault/bun.lock', 'vault/bun.lockb') }} | |
| restore-keys: | | |
| bun-${{ runner.os }}- | |
| - name: Install dependencies | |
| working-directory: vault | |
| run: bun install --frozen-lockfile | |
| - name: Run ${{ matrix.task }} | |
| working-directory: vault | |
| run: | | |
| if [ "${{ matrix.task }}" = "test" ]; then | |
| bun test | |
| else | |
| bun run check | |
| fi | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| needs: [vault-tests] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push seedhypermedia/vault:dev | |
| if: github.ref == 'refs/heads/main' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| context: . | |
| file: vault/Dockerfile | |
| tags: seedhypermedia/vault:dev | |
| cache-from: type=registry,ref=seedhypermedia/vault:buildcache | |
| cache-to: type=registry,ref=seedhypermedia/vault:buildcache,mode=max |