Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Dec 23, 2023
1 parent 290de07 commit c55d2f5
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

env:
DOCKERHUB_SLUG: anonaddy/anonaddy
IMAGE_BUILD_TIMEOUT: "3600"

jobs:
build:
Expand Down Expand Up @@ -46,7 +47,10 @@ jobs:
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
Expand All @@ -56,13 +60,33 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build
uses: docker/bake-action@v4
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: image-all
push: ${{ github.event_name != 'pull_request' }}
run: |
docker buildx bake image-all -f ./docker-bake.hcl -f ${{ steps.meta.outputs.bake-file }}
bpid=$!
sleepinter=10
iter=$(( ${{ env.IMAGE_BUILD_TIMEOUT }} / $sleepinter ))
for ((i = 0; i < iter; i++)); do
if ! kill -0 $bpid 2>/dev/null; then
exit 0
fi
sleep $sleepinter
done
echo "::error::Build timed out after ${IMAGE_BUILD_TIMEOUT} seconds"
set -x
docker exec buildx_buildkit_${{ steps.buildx.outputs.name }}0 ps aux
docker kill --signal=SIGQUIT buildx_buildkit_${{ steps.buildx.outputs.name }}0
kill -15 $bpid
wait $bpid
exit 1
# -
# name: Build
# uses: docker/bake-action@v4
# with:
# files: |
# ./docker-bake.hcl
# ${{ steps.meta.outputs.bake-file }}
# targets: image-all
# push: ${{ github.event_name != 'pull_request' }}
-
name: Check manifest
if: github.event_name != 'pull_request'
Expand Down

0 comments on commit c55d2f5

Please sign in to comment.