Add clang
and gcc
Docker images to Docker build workflow
#4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Docker Build Env | |
on: | |
push: | |
# Builds should happen on feature branches | |
# Only successfully tested builds should be merged to main | |
# We don't want to rebuild after testing and verifying | |
branches-ignore: | |
- 'main' | |
paths: | |
- '.github/workflows/buildDockerBuildEnv.yml' | |
- 'dockerBuildEnv/*' | |
workflow_dispatch: | |
jobs: | |
dockerBuild: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- 'arch' | |
- 'clang' | |
- 'gcc' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch main | |
run: | | |
git remote set-branches --add origin main | |
git fetch --depth 1 | |
- name: Check for changes | |
id: diff | |
run: | | |
set +e | |
git diff --exit-code --no-patch origin/main dockerBuildEnv/makefile dockerBuildEnv/nas2d-${{ matrix.platform }}.* ; echo "modified=$?" >> $GITHUB_OUTPUT | |
- name: Docker build | |
if: ${{ fromJSON(steps.diff.outputs.modified) }} | |
run: make build-image-${{ matrix.platform }} | |
- name: Docker login | |
if: ${{ fromJSON(steps.diff.outputs.modified) }} | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username "${{ github.repository_owner }}" --password-stdin | |
- name: Docker push | |
if: ${{ fromJSON(steps.diff.outputs.modified) }} | |
run: make push-image-${{ matrix.platform }} |