Skip to content

Commit

Permalink
Merge pull request #1166 from lairworks/dockerBuildRun
Browse files Browse the repository at this point in the history
Add workflow to build Docker images
  • Loading branch information
DanRStevens authored Aug 16, 2024
2 parents adafb14 + 290b968 commit 9d3743e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/dockerBuild.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion docker/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docker/nas2d-arch.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/nas2d-arch.version.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ImageVersion_arch := 1.4
ImageVersion_arch := 1.5

0 comments on commit 9d3743e

Please sign in to comment.