Add v0.4.16 #51
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] | |
env: | |
dockerid: ${{ secrets.dockerid }} | |
dockerpass: ${{ secrets.dockerpass }} | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# List of tags to build and upload, remember to update this | |
tag: [0.4.16] | |
env: | |
dockertag: ${{ matrix.tag }} | |
dockerimg: openrct2/openrct2-cli | |
dockerlst: 0.4.16 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build docker image | |
run: | | |
ctxpath=${dockertag//-/\/}/cli | |
echo "Building $dockerimg:$dockertag from $ctxpath..." | |
docker build -t $dockerimg:$dockertag $ctxpath | |
- name: Tag latest docker image | |
run: | | |
if [ "$dockertag" == "$dockerlst" ]; then | |
echo "Tagging $dockerimg:$dockertag as $dockerimg:latest..." | |
docker tag $dockerimg:$dockertag $dockerimg:latest | |
else | |
echo "Latest tag not updated" | |
fi | |
- name: Login to docker | |
run: | | |
if [ "$dockerid" != "" ]; then | |
docker login -u "$dockerid" -p "$dockerpass" | |
echo "Docker login successful" | |
else | |
echo "No docker login performed" | |
fi | |
- name: Publish docker images | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
if [ "$dockerid" != "" ]; then | |
echo "Pushing $dockerimg:$dockertag..." | |
docker push $dockerimg:$dockertag | |
if [ "$dockertag" == "$dockerlst" ]; then | |
echo "Pushing $dockerimg:latest..." | |
docker push $dockerimg:latest | |
fi | |
else | |
echo "No docker images published" | |
fi |