Skip to content

Streamline and combine docker workflows #5

Streamline and combine docker workflows

Streamline and combine docker workflows #5

Workflow file for this run

name: sgdk-docker
concurrency:
group: ${{ github.ref }}-sgdk-docker
cancel-in-progress: true
on:
workflow_dispatch: # Allows for manual triggering.
pull_request: # Trigger for pull requests.
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
push: # Trigger when pushed to master.
branches:
- 'master'
paths-ignore:
- '.github/**'
- 'vstudio/**'
- 'bin/**'
- 'sample/**'
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR (push events only)
if: github.event_name == 'push'
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build (and maybe push) m68k GCC
uses: docker/build-push-action@v5
with:
file: deps/gcc.Dockerfile
context: deps/
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.actor }}/sgdk-m68k-gcc:latest
push: ${{ github.event_name == 'push' }}
- name: Build (any maybe push) SGDK
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.actor }}/sgdk:latest
push: ${{ github.event_name == 'push' }}