From 2b1e7c8b24ab8edad8b68531674c58143bbf43a8 Mon Sep 17 00:00:00 2001 From: "Tomi P. Hakala" Date: Sun, 16 Feb 2025 11:03:04 +0200 Subject: [PATCH] ci: Simplify Docker image build workflow Github is deprecating ubuntu-20.04 image and since testing was depending on that specific version I have to remove imate test part for now --- .github/workflows/docker-build.yml | 44 ++---------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 0b4b3ba4..3ff1ce70 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -20,48 +20,10 @@ jobs: golangci: uses: ./.github/workflows/golangci-lint.yml - test-docker-image: - needs: [golangci] - # Ubuntu-20.04 required until this is fixed: https://github.com/actions/runner-images/discussions/9074 - runs-on: ubuntu-20.04 - steps: - - name: Checkout GitHub Action - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build amd64 image for testing - uses: docker/build-push-action@v6 - with: - context: . - tags: birdnet-go:test - load: true - platforms: linux/amd64 - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Install alsa dummy module for testing built image - run: | - sudo apt-get install linux-modules-extra-$(uname -r) - sudo modprobe snd-dummy - - - name: Test built amd64 image - run: | - docker run --rm -p 8080:8080 --device /dev/snd --env ALSA_CARD=0 birdnet-go:test realtime --source "Dummy" & p1=$! - if ! wget --retry-connrefused --waitretry=1 --tries=5 -q -O /dev/null http://localhost:8080; then - echo "Failed to reach container after 5 sec" - kill "$p1" - exit 1 - else - echo "Container responded to request" - kill "$p1" - fi - - push-docker-image: - needs: test-docker-image + build-and-push-docker-image: + needs: golangci if: github.event_name == 'push' && github.ref_name == 'main' - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout GitHub Action uses: actions/checkout@v4