From 5aef16309a43ccc52773449acf6bd1d273eaa5a8 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 8 Feb 2023 11:54:17 +0100 Subject: Makefile: fix make */build recipes --- .github/workflows/ci.yml | 24 +++++++++++++++++++++++- Makefile | 6 +++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f379d3..77ad7df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,29 @@ jobs: - name: Unit tests run: python -m unittest --buffer + build_docker: + runs-on: ubuntu-latest + name: 'Build / docker build' + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build w/ docker build + run: make docker/build + + build_buildx: + runs-on: ubuntu-latest + name: 'Build / docker buildx' + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build w/ docker buildx + run: | + make buildx/create + make buildx/build + make buildx/rm + test_docker: + needs: [test_local, build_docker, build_buildx] runs-on: ubuntu-latest name: 'Test / Docker' steps: @@ -46,7 +68,7 @@ jobs: run: sudo ./test/integration/docker/test.sh test_example_config: - needs: [test_local, test_docker] + needs: [test_local, build_docker, build_buildx] runs-on: ubuntu-latest name: 'Test / example config' env: diff --git a/Makefile b/Makefile index f07315c..0344357 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ endif # Dockerfile's, create a manifest manually, etc.), so it's only here for # testing purposes, and native builds. docker/build: check-build - docker build -t '$(call escape,$(DOCKER_USERNAME))/$(call escape,$(PROJECT))' . + docker build -t '$(call escape,$(DOCKER_USERNAME))/$(call escape,$(PROJECT))' -f docker/Dockerfile . .PHONY: docker/push # `docker push` would replace the multiarch repo with a single image by default @@ -91,11 +91,11 @@ buildx/rm: .PHONY: buildx/build buildx/build: - docker buildx build -t '$(call escape,$(DOCKER_USERNAME))/$(call escape,$(PROJECT))' --platform '$(call escape,$(PLATFORMS))' --progress plain . + docker buildx build -t '$(call escape,$(DOCKER_USERNAME))/$(call escape,$(PROJECT))' -f docker/Dockerfile --platform '$(call escape,$(PLATFORMS))' --progress plain . .PHONY: buildx/push buildx/push: - docker buildx build -t '$(call escape,$(DOCKER_USERNAME))/$(call escape,$(PROJECT))' --platform '$(call escape,$(PLATFORMS))' --progress plain --push . + docker buildx build -t '$(call escape,$(DOCKER_USERNAME))/$(call escape,$(PROJECT))' -f docker/Dockerfile --platform '$(call escape,$(PLATFORMS))' --progress plain --push . venv_dir := .venv -- cgit v1.2.3