Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI action to create Docker releases #36

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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.buildtType.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 }}
Loading