fix(review): strengthen cached-header check and tighten tests #52
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: build-and-push | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| step: ['lint:check', 'test', 'build'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup yarn | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: 'yarn' | |
| - run: yarn --immutable --immutable-cache | |
| - run: yarn ${{ matrix.step }} | |
| push: | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| checks: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Setup Docker buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Log in to the GitHub Container Registry | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push container image to GitHub Container Registry | |
| uses: docker/build-push-action@v4 | |
| with: | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/ar-io/ar-io-observer:${{ github.sha }} | |
| ghcr.io/ar-io/ar-io-observer:latest | |
| trigger: | |
| needs: [push] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger ar-io-observer deployment | |
| uses: benc-uk/workflow-dispatch@v1 | |
| with: | |
| workflow: deploy-observer-image.yml | |
| inputs: '{"image_sha": "${{ github.sha }}"}' |