1name: docker 2 3on: 4 pull_request: 5 paths: 6 - '.github/workflows/docker.yaml' 7 - 'Dockerfile' 8 - 'include/**' 9 - 'libbpf/**' 10 - 'src/**' 11 push: 12 branches: 13 - master 14 15concurrency: 16 group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }} 17 cancel-in-progress: true 18 19jobs: 20 dockerimage: 21 name: Docker image 22 runs-on: ubuntu-latest 23 steps: 24 - name: Checkout repository 25 uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 26 with: 27 submodules: recursive 28 29 - name: Build bpftool container image 30 uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0 31 with: 32 push: false 33 tags: bpftool:latest 34 35 - name: Test bpftool container image 36 run: | 37 docker run --rm --privileged --pid=host bpftool version 38 docker run --rm --privileged --pid=host bpftool prog 39 docker run --rm --privileged --pid=host bpftool map 40 41 - name: Lint Docker image 42 uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0 43 with: 44 dockerfile: Dockerfile 45