Skip to content

fix(deps): update all go dependencies main (main) #2333

fix(deps): update all go dependencies main (main)

fix(deps): update all go dependencies main (main) #2333

name: CI check format
on:
pull_request: {}
# 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-24.04
steps:
- name: Checkout PR Source Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
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 "BUILDER_DOCKER_HASH=$(git ls-tree --full-tree HEAD -- ./Dockerfile.builder | awk '{ print $3 }')" >> $GITHUB_ENV
- name: Wait for build image
uses: ./.github/workflows/wait-for-image
with:
SHA: ${{ env.BUILDER_DOCKER_HASH }}
repo: cilium
images: cilium-envoy-builder-dev
- name: Check format
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.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 }}
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@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: check-format-results
path: check-format-results/format-output.txt
retention-days: 5
tidy:
timeout-minutes: 60
name: Lint source style
runs-on: ubuntu-24.04
steps:
- name: Checkout PR Source Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
fetch-depth: 2
- name: Prep for build
run: |
echo "${{ github.event.pull_request.head.sha }}" >SOURCE_VERSION
echo "BUILDER_DOCKER_HASH=$(git ls-tree --full-tree HEAD -- ./Dockerfile.builder | awk '{ print $3 }')" >> $GITHUB_ENV
# git diff filter has everything else than deleted files (those need not be tidied)
echo "TIDY_SOURCES=$(git diff --name-only --diff-filter=ACMRTUXB HEAD^1 | grep -E '(.h$|.cc$)' | tr '\n' ' ')" >> $GITHUB_ENV
- name: Wait for build image
uses: ./.github/workflows/wait-for-image
with:
SHA: ${{ env.BUILDER_DOCKER_HASH }}
repo: cilium
images: cilium-envoy-builder-dev
- name: Run clang-tidy
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
# skip if nothing changed
if: ${{ env.TIDY_SOURCES != '' }}
id: docker_clang_tidy
with:
target: clang-tidy
provenance: false
context: .
file: ./Dockerfile
platforms: linux/amd64
outputs: type=local,dest=clang-tidy-results
build-args: |
BUILDER_BASE=quay.io/${{ github.repository_owner }}/cilium-envoy-builder-dev:${{ env.BUILDER_DOCKER_HASH }}
TIDY_SOURCES=${{ env.TIDY_SOURCES }}
push: false
- name: Check for failure
run: |
if grep -q "^clang-tidy fix produced changes, please commit them." clang-tidy-results/clang-tidy-output.txt; then
exit 1
fi
- name: Upload clang-tidy results
if: failure()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: clang-tidy-results
path: clang-tidy-results/*.txt
retention-days: 5