Add new Dockerfiles for Ubuntu Jammy, Mantic, and Fedora 38 (MinGW) #43
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Remember if you commit this, newly built images will replace those tags. | |
# Prefer incrementing the version to unused one | |
tag: [6-bionic32, 6-mingw32, 6-focal32, 6-jammy32] | |
env: | |
dockertag: ${{ matrix.tag }} | |
REGISTRY: ghcr.io | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Build docker image | |
run: | | |
ctxpath=${dockertag//-/\/} | |
SLUG=$(echo ${{ github.repository_owner }}/openloco | tr '[A-Z]' '[a-z]') | |
docker build -t openloco $ctxpath | |
- name: Push image to registry | |
if: github.event_name == 'push' && github.ref_name == 'master' | |
run: | | |
SLUG=$(echo ${{ github.repository_owner }}/openloco | tr '[A-Z]' '[a-z]') | |
if [ "${{ secrets.GITHUB_TOKEN }}" != "" ]; then | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login $REGISTRY -u $ --password-stdin | |
docker tag openloco $REGISTRY/$SLUG:$dockertag | |
docker push $REGISTRY/$SLUG:$dockertag | |
else | |
echo 'Image not pushed' | |
fi | |
tag: | |
name: Tag images | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
REGISTRY: ghcr.io | |
steps: | |
- name: Tag docker images | |
if: github.event_name == 'push' && github.ref_name == 'master' | |
run: | | |
if [ "${{ secrets.GITHUB_TOKEN }}" != "" ]; then | |
SLUG=$(echo ${{ github.repository_owner }}/openloco | tr '[A-Z]' '[a-z]') | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login $REGISTRY -u $ --password-stdin | |
docker pull $REGISTRY/$SLUG:6-bionic32 | |
docker tag $REGISTRY/$SLUG:6-bionic32 $REGISTRY/$SLUG:6 | |
docker tag $REGISTRY/$SLUG:6-bionic32 $REGISTRY/$SLUG:latest | |
docker push $REGISTRY/$SLUG:6 | |
docker push $REGISTRY/$SLUG:latest | |
else | |
echo 'Images not tagged' | |
fi |