Skip to content

Commit 6c865d4

Browse files
authored
Merge pull request #5 from KVSlab/add-docker-workflow
Add docker workflows script for Github actions
2 parents f9e4109 + 16b7d21 commit 6c865d4

File tree

4 files changed

+63
-3
lines changed

4 files changed

+63
-3
lines changed

.github/workflows/docker.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Create and publish a Docker image
7+
8+
on:
9+
push:
10+
branches:
11+
- "!*"
12+
tags:
13+
- "v*"
14+
15+
env:
16+
REGISTRY: ghcr.io
17+
IMAGE_NAME: ${{ github.repository }}
18+
19+
jobs:
20+
build-and-push-image:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
packages: write
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v3
29+
30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v2
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v2
35+
36+
- name: Log in to the Container registry
37+
uses: docker/login-action@v2
38+
with:
39+
registry: ${{ env.REGISTRY }}
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Extract metadata (tags, labels) for Docker
44+
id: meta
45+
uses: docker/metadata-action@v4
46+
with:
47+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
48+
49+
- name: Build and push Docker image
50+
uses: docker/build-push-action@v3
51+
with:
52+
context: .
53+
push: true
54+
platforms: linux/amd64 #,linux/arm64
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}
57+
file: docker/Dockerfile

CITATION.cff

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
cff-version: 1.2.0
2-
message: "If you use this software, please cite it as below."
2+
message: "If you use OasisMove, please cite it as below."
33
authors:
44
- family-names: "Kjeldsberg"
55
given-names: "Henrik A."
66
orcid: "0000-0002-7764-4248"
77
title: "OasisMove"
88
version: "0.1.0"
9-
date-released: 2023-01-28
9+
date-released: 2023-04-26

docker/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ RUN mamba upgrade -y mamba
1212
# Copy environment and requirements files into docker env
1313
COPY . ${WORKDIR}
1414

15+
# Update environment file with new environment name
16+
RUN mamba env update --file environment.yml --name dockerenv
17+
1518
RUN echo "source activate dockerenv" > ~/.bashrc
1619

1720
RUN mamba run -n dockerenv python -m pip install .[test]

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = ["setuptools>=61.0.0", "wheel"]
44
[project]
55
name = "oasismove"
66
version = "0.1.0"
7-
description = "Moving domain version of Oasis"
7+
description = "Verified and validated CFD solver for moving domains"
88
authors = [{ name = "Henrik A. Kjeldsberg", email = "[email protected]" }]
99
license = { file = "LICENSE" }
1010
readme = "README.md"

0 commit comments

Comments
 (0)