Release Docker #4
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: Release Docker | |
# Builds and deploys images to Dockerhub | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Docker tag (e.g. 1.1.0 or stable)' | |
required: true | |
default: 'x.y.z' | |
env: | |
# GitHub runners currently have two cores | |
NR_JOBS: "2" | |
jobs: | |
deploy: | |
name: Deploy (${{ matrix.buildType.name }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
buildType: | |
- {name: "Debug", | |
suffix: "-debug", | |
distro: "storm-basesystem:latest", | |
} | |
- {name: "Release", | |
suffix: "", | |
distro: "storm-basesystem:latest", | |
} | |
steps: | |
- name: Git clone | |
uses: actions/checkout@v4 | |
- name: Build Carl-storm from Dockerfile | |
run: | | |
docker build -t movesrwth/carl-storm:${{ github.event.inputs.tag }}${{ matrix.buildType.suffix }} . \ | |
--build-arg BASE_IMAGE=movesrwth/${{ matrix.buildType.distro }} \ | |
--build-arg build_type="${{ matrix.buildType.name }}" \ | |
--build-arg no_threads=${NR_JOBS} | |
- name: Login to Docker Hub | |
# Only login if using original repo | |
if: github.repository_owner == 'moves-rwth' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.STORM_CI_DOCKER_USERNAME }} | |
password: ${{ secrets.STORM_CI_DOCKER_TOKEN }} | |
- name: Deploy Carl-storm | |
# Only deploy if using original repo | |
if: github.repository_owner == 'moves-rwth' | |
run: | | |
docker push movesrwth/carl-storm:${{ github.event.inputs.tag }}${{ matrix.buildType.suffix }} |