Skip to content

Merge pull request #5 from feelpp/4-add-package-management-when-conve… #15

Merge pull request #5 from feelpp/4-add-package-management-when-conve…

Merge pull request #5 from feelpp/4-add-package-management-when-conve… #15

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
tags:
- 'v*'
pull_request:
branches:
- 'develop'
workflow_dispatch:
inputs:
build:
description: 'Build the project'
required: false
default: 'true'
deliver:
description: 'Build and deliver the project'
required: false
default: 'false'
jobs:
#docs:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'doc skip')"
# steps:
# - uses: buildkite/[email protected]
# env:
# BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }}
# PIPELINE: "feelpp/cemosis-docs"
# COMMIT: "HEAD"
# BRANCH: "master"
# MESSAGE: ":github: Triggered from a GitHub Action by swimmer Project"
build:
runs-on: self-ubuntu-22.04
if: "!contains(github.event.head_commit.message, 'ci skip') || ${{ inputs.build }} == 'true'"
name: Check Build, Install, Run
container: ghcr.io/feelpp/dymola:2021
steps:
- run: /usr/bin/git --version
- uses: actions/checkout@v4
- name: Build mo2fmu
run: |
pip3 install click spdlog
pip3 install --editable .
mo2fmu -v ode_exp.mo .
deliver:
runs-on: self-ubuntu-22.04
needs: build
if: "${{ inputs.deliver }} == 'true'"
# needs: check
name: Docker Build, Tag, Push
steps:
- uses: actions/checkout@v4
with:
lfs: true
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/feelpp/mo2fmu
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
-
name: Build container image
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
context: artifacts
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile