Skip to content

Commit

Permalink
Merge pull request #1180 from lairworks/improveDockerMakefile
Browse files Browse the repository at this point in the history
Improve docker `makefile`
  • Loading branch information
DanRStevens authored Dec 29, 2024
2 parents a88517a + a031559 commit 0ea59b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/buildDockerBuildEnv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: diff
run: |
set +e
git diff --exit-code --no-patch "origin/${defaultBranch}" dockerBuildEnv/makefile dockerBuildEnv/nas2d-${{ matrix.platform }}.* ; echo "modified=$?" >> $GITHUB_OUTPUT
git diff --exit-code --no-patch "origin/${defaultBranch}" dockerBuildEnv/nas2d-${{ matrix.platform }}.* ; echo "modified=$?" >> $GITHUB_OUTPUT
- name: Docker build
if: ${{ fromJSON(steps.diff.outputs.modified) }}
Expand Down
5 changes: 2 additions & 3 deletions dockerBuildEnv/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# Note: MAKEFILE_LIST's last entry is the last processed Makefile.
# That should be the current Makefile, assuming no includes
DockerBuildEnvFolder := $(abspath $(dir $(lastword ${MAKEFILE_LIST})))
TopLevelFolder := $(abspath $(DockerBuildEnvFolder)/..)

DockerRunFlags := --volume ${TopLevelFolder}:/code --workdir=/code --rm --tty
DockerRunFlags = --volume ${CURDIR}:/code --workdir=/code --rm --tty ${DockerAdditionalFlags}
DockerUserFlags = --user="$(shell id --user):$(shell id --group)"
DockerRepository ?= ghcr.io/lairworks

include $(wildcard $(DockerBuildEnvFolder)/nas2d-*.version.mk)
include $(wildcard ${DockerBuildEnvFolder}/nas2d-*.version.mk)

DockerFileName = ${DockerBuildEnvFolder}/nas2d-$*.Dockerfile

Expand Down

0 comments on commit 0ea59b9

Please sign in to comment.