Skip to content

Merge pull request #26 from myk002/myk_modernize #6

Merge pull request #26 from myk002/myk_modernize

Merge pull request #26 from myk002/myk_modernize #6

name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build-and-push:
strategy:
matrix:
IMAGE_TAG:
- gcc-4.8
- latest
- msvc
runs-on: ubuntu-latest
steps:
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: DFHack-Urist
password: ${{ secrets.GHCR_TOKEN }}
# From https://github.com/docker/build-push-action#git-context
# Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}:${{ matrix.IMAGE_TAG }}"
push: true
tags: ghcr.io/${{ env.GHCR_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ matrix.IMAGE_TAG }}
env:
GHCR_NAMESPACE: dfhack
IMAGE_NAME: build-env