Skip to content

build: Add debug build step #1003

build: Add debug build step

build: Add debug build step #1003

name: CI check format
on:
pull_request_target:
types: [opened, synchronize, reopened]
# By specifying the access of one of the scopes, all of those that are not specified are set to 'none'.
permissions:
# To be able to access the repository with actions/checkout
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
cancel-in-progress: true
jobs:
format:
timeout-minutes: 30
name: Check source format
runs-on: ubuntu-latest
steps:
- name: Checkout PR Source Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Prep for build
run: |
echo "${{ github.event.pull_request.head.sha }}" >SOURCE_VERSION
echo "ENVOY_VERSION=$(cat ENVOY_VERSION)" >> $GITHUB_ENV
echo "BUILDER_DOCKER_HASH=$(git ls-tree --full-tree HEAD -- ./Dockerfile.builder | awk '{ print $3 }')" >> $GITHUB_ENV
- name: Wait for cilium-envoy-builder to be available
timeout-minutes: 45
shell: bash
run: until docker manifest inspect quay.io/${{ github.repository_owner }}/cilium-envoy-builder-dev:${{ env.BUILDER_DOCKER_HASH }} &> /dev/null; do sleep 15s; done
- name: Check format
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
id: docker_format_ciak
with:
target: format
provenance: false
context: .
file: ./Dockerfile
platforms: linux/amd64
outputs: type=local,dest=check-format-results
build-args: |
BUILDER_BASE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder-dev:${{ env.BUILDER_DOCKER_HASH }}
cache-from: type=local,src=/tmp/buildx-cache
push: false
- name: Check for failure
run: '! grep "^Format check failed" check-format-results/format-output.txt'
- name: Upload Format results
if: failure()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: check-format-results
path: check-format-results/format-output.txt
retention-days: 5