From b30a9d4c140e58a8a3bf0469530f92589790ca6a Mon Sep 17 00:00:00 2001 From: fruffy Date: Mon, 27 Jul 2026 22:24:14 +0200 Subject: [PATCH 1/2] Refresh the apt dependencies. Signed-off-by: fruffy --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74e94119..938fab5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,4 +53,5 @@ jobs: push: true tags: p4lang/pi:${{ steps.get-tag.outputs.tag }} cache-from: type=gha - cache-to: type=gha,mode=max + # A cache write must not fail the build. + cache-to: type=gha,mode=max,ignore-error=true From 555fb5b2fd6fd6e595120b7d99df184f3f2f9d18 Mon Sep 17 00:00:00 2001 From: fruffy Date: Mon, 27 Jul 2026 22:53:31 +0200 Subject: [PATCH 2/2] Add a sanity test before pushing. Signed-off-by: fruffy --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 938fab5a..892c45c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: exit 1 fi echo "Tag is $TAG" - echo "::set-output name=tag::$TAG" + echo "tag=$TAG" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 - name: Login to DockerHub @@ -46,12 +46,22 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push Docker image to registry + - name: Build Docker image uses: docker/build-push-action@v7 with: context: . - push: true + load: true tags: p4lang/pi:${{ steps.get-tag.outputs.tag }} cache-from: type=gha # A cache write must not fail the build. cache-to: type=gha,mode=max,ignore-error=true + - name: Smoke test Docker image + run: | + docker run --rm p4lang/pi:${{ steps.get-tag.outputs.tag }} pi_convert_p4info -h + - name: Push Docker image to registry + uses: docker/build-push-action@v7 + with: + context: . + push: true + tags: p4lang/pi:${{ steps.get-tag.outputs.tag }} + cache-from: type=gha