diff --git a/.github/workflows/observer-build.yaml b/.github/workflows/observer-build.yaml new file mode 100644 index 00000000..b39c024d --- /dev/null +++ b/.github/workflows/observer-build.yaml @@ -0,0 +1,44 @@ +name: Observer Docker build + +on: + pull_request: + paths-ignore: + - "**/*.md" + - "**/*.txt" + push: + branches: + - main + paths-ignore: + - "**/*.md" + - "**/*.txt" + +permissions: + contents: read + +concurrency: + group: observer-build-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + observer-build: + name: Build observer image + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Check out code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up Docker buildx + uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 + + - name: Build observer image + uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 + with: + context: . + file: tools/observer/Dockerfile + platforms: linux/amd64 + push: false + cache-from: type=gha,scope=observer-build + cache-to: type=gha,mode=max,scope=observer-build