From 68b22aac8071f35be172ddc6e644d7e352ff4ce4 Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Fri, 16 Aug 2024 03:59:25 -0600 Subject: [PATCH 1/4] Allow `DockerRepository` to be inherited from the environment --- docker/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/makefile b/docker/makefile index 623dd205..1f7f2c99 100644 --- a/docker/makefile +++ b/docker/makefile @@ -8,7 +8,7 @@ TopLevelFolder := $(abspath $(DockerFolder)/..) DockerRunFlags := --volume ${TopLevelFolder}:/code --workdir=/code --rm --tty DockerUserFlags = --user="$(shell id --user):$(shell id --group)" -DockerRepository := outpostuniverse +DockerRepository ?= outpostuniverse include $(wildcard $(DockerFolder)/nas2d-*.version.mk) From 00b227cdd3b7add152df877a42439954dc79363f Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Fri, 16 Aug 2024 04:38:08 -0600 Subject: [PATCH 2/4] Add workflow to build Docker images --- .github/workflows/dockerBuild.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/dockerBuild.yml diff --git a/.github/workflows/dockerBuild.yml b/.github/workflows/dockerBuild.yml new file mode 100644 index 00000000..96954738 --- /dev/null +++ b/.github/workflows/dockerBuild.yml @@ -0,0 +1,29 @@ +name: Docker Build + +on: + push: + paths: + - ".github/workflows/dockerBuild.yml" + - "docker/*" + workflow_dispatch: + +jobs: + dockerBuild: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - "arch" + env: + DockerRepository: ghcr.io/${{ github.repository_owner }} + + steps: + - uses: actions/checkout@v4 + + - run: make -C docker build-image-${{ matrix.platform }} + + - name: Docker login + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username "${{ github.repository_owner }}" --password-stdin + + - run: make -C docker push-image-${{ matrix.platform }} From 944ea635b97ec6980fa5f920ea02b12e57d30c07 Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Fri, 16 Aug 2024 04:38:20 -0600 Subject: [PATCH 3/4] Update base image for Arch Linux build --- docker/nas2d-arch.Dockerfile | 2 +- docker/nas2d-arch.version.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/nas2d-arch.Dockerfile b/docker/nas2d-arch.Dockerfile index 3fb708c6..2d230dde 100644 --- a/docker/nas2d-arch.Dockerfile +++ b/docker/nas2d-arch.Dockerfile @@ -1,6 +1,6 @@ # See Docker section of makefile in root project folder for usage commands. -FROM archlinux:base-20230604.0.155602 +FROM archlinux:base-20240811.0.253648 # Install base development tools # Includes tools to build download, unpack, and build source packages diff --git a/docker/nas2d-arch.version.mk b/docker/nas2d-arch.version.mk index ab1b348b..234342d1 100644 --- a/docker/nas2d-arch.version.mk +++ b/docker/nas2d-arch.version.mk @@ -1 +1 @@ -ImageVersion_arch := 1.4 +ImageVersion_arch := 1.5 From 290b9683dd83b50a33155f7f421fc7d052952c6a Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Fri, 16 Aug 2024 04:41:57 -0600 Subject: [PATCH 4/4] Run Arch build using newly updated Docker image --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91348fee..e26661a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,10 +64,10 @@ jobs: fail-fast: false matrix: image: - - "nas2d-arch:1.4" + - "nas2d-arch:1.5" runs-on: ubuntu-latest container: - image: "outpostuniverse/${{ matrix.image }}" + image: "ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}" steps: - uses: actions/checkout@v4