wasm: eliminate "spaces handles" in packed reader; just use spaces le… #24
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: Docker Release | |
| # This workflow was largely generated from the following prompt: | |
| # "only run this on merge to main; clone the repo; set the VERSION environment | |
| # variable from packages/runtime/package.json; use `docker manifest inspect` | |
| # to verify the release doesn't already exist; create a multi-platform builder; | |
| # build and push the image" | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get version | |
| id: version | |
| run: | | |
| echo "VERSION=$(cat packages/runtime/package.json | jq -r '.version')" >> "$GITHUB_OUTPUT" | |
| - name: Check if image already exists | |
| id: check | |
| run: | | |
| if docker manifest inspect ohmjs/ohm:${{ steps.version.outputs.VERSION }} > /dev/null 2>&1; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Set up QEMU | |
| if: steps.check.outputs.exists == 'false' | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| if: steps.check.outputs.exists == 'false' | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to Docker Hub | |
| if: steps.check.outputs.exists == 'false' | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push | |
| if: steps.check.outputs.exists == 'false' | |
| uses: docker/bake-action@v7 | |
| with: | |
| files: docker/docker-compose.yml | |
| push: true | |
| env: | |
| VERSION: ${{ steps.version.outputs.VERSION }} |