Skip to content

make the workflow look more like the example #11

make the workflow look more like the example

make the workflow look more like the example #11

name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build-and-push:
strategy:
matrix:
IMAGE_TAG:
- msvc
# - gcc-4.8
# - latest
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:${{ matrix.IMAGE_TAG }}"
push: true
tags: ${{ env.GHCR_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ matrix.IMAGE_TAG }}
env:
GHCR_NAMESPACE: dfhack
IMAGE_NAME: build-env