Skip to content

Commit

Permalink
debug makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
fqjony committed Dec 23, 2024
1 parent afaaf5e commit 9968919
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Run Development Pipeline
# run: make dev-pipeline
run: MULTIPLATFORM=true make dev-pipeline
run: make dev-pipeline
# run: MULTIPLATFORM=true make dev-pipeline
working-directory: .
env:
AZURE_CREDS: ${{ secrets.AZURE_CREDS }}
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ build:
# Run Docker container (supports interactive mode)
run: clean
@echo "Running Docker container..."
@echo "Docker image: $(DOCKER_IMAGE)"
@echo "Docker image: $(COMMAND)"
@docker run $(if $(INTERACTIVE),-it,-d) --rm --name $(CONTAINER_NAME) \
$(foreach file,$(wildcard *.json),\
$(eval CREDS_VAR_NAME=$(shell echo "$(file)" | sed -e 's/\.json//g' -e 's/\./_/g' | tr '[:lower:]' '[:upper:]')) \
$(eval CREDS_VAR_VALUE=$(shell cat "$(file)" | jq -c .)) \
-e $(CREDS_VAR_NAME)='$(CREDS_VAR_VALUE)' \
) \
$(foreach env_var,$(filter %_CREDS,$(.VARIABLES)),\
-e $(env_var)=$($(env_var)) \
) \
$(foreach vol,$(VOLUMES),-v $(vol)) \
$(DOCKER_IMAGE) $(COMMAND)
$(if $(filter false,$(INTERACTIVE)),docker logs -f $(CONTAINER_NAME);)
Expand Down

0 comments on commit 9968919

Please sign in to comment.