Skip to content

Commit ae304ed

Browse files
authored
Merge pull request #4 from mrbuche/main
Docker
2 parents a75550d + 6cf5526 commit ae304ed

File tree

4 files changed

+70
-3
lines changed

4 files changed

+70
-3
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Docker latest
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04
8+
if: startsWith(github.ref, 'refs/heads/main')
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: docker/login-action@v1.12.0
12+
with:
13+
username: dprohe
14+
password: ${{ secrets.DOCKERHUB_TOKEN }}
15+
- uses: docker/build-push-action@v2.8.0
16+
with:
17+
push: true
18+
tags: dprohe/sdynpy:latest
19+
- run: sleep 500s
20+
test:
21+
needs: build
22+
runs-on: ubuntu-22.04
23+
container: dprohe/sdynpy
24+
steps:
25+
- run: python -m pytest --verbose src/sdynpy
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Docker versioned
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- name: Get tag
11+
id: tag
12+
uses: dawidd6/action-get-tag@v1
13+
with:
14+
strip_v: true
15+
- uses: actions/checkout@v3
16+
- uses: docker/login-action@v1.12.0
17+
with:
18+
username: dprohe
19+
password: ${{ secrets.DOCKERHUB_TOKEN }}
20+
- uses: docker/build-push-action@v2.8.0
21+
with:
22+
push: true
23+
tags: |
24+
dprohe/sdynpy:${{steps.tag.outputs.tag}}
25+
dprohe/sdynpy:latest
26+
- run: sleep 500s
27+
test:
28+
needs: build
29+
runs-on: ubuntu-22.04
30+
container: dprohe/sdynpy
31+
steps:
32+
- run: python -m pytest --verbose src/sdynpy

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM python:3
2+
RUN git clone --depth 1 https://github.com/sandialabs/sdynpy.git
3+
RUN cd sdynpy/
4+
RUN pip install .[all]

README.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Structural Dynamics Python Libraries
33
####################################
44

5-
|documentation| |build| |codecov| |coveralls| |pylint|
5+
|documentation| |build| |codecov| |coveralls| |codefactor| |pylint| |docker|
66

77
This repository houses SDynPy, a Python module built for doing structural dynamics analysis using Python.
88
It contains core objects that define test geometry and data. It contains readers and writers for common data formats.
@@ -20,10 +20,10 @@ Information
2020
..
2121
Badges ========================================================================
2222
23-
.. |documentation| image:: https://img.shields.io/github/workflow/status/sandialabs/sdynpy/pages/main?label=Documentation
23+
.. |documentation| image:: https://img.shields.io/github/actions/workflow/status/sandialabs/sdynpy/pages.yml?branch=main&label=Documentation
2424
:target: https://sandialabs.github.io/sdynpy/
2525

26-
.. |build| image:: https://img.shields.io/github/workflow/status/sandialabs/sdynpy/main?label=GitHub&logo=github
26+
.. |build| image:: https://img.shields.io/github/actions/workflow/status/sandialabs/sdynpy/main.yml?branch=main&label=GitHub&logo=github
2727
:target: https://github.com/sandialabs/sdynpy
2828

2929
.. |pylint| image:: https://raw.githubusercontent.com/sandialabs/sdynpy/gh-pages/pylint.svg
@@ -34,3 +34,9 @@ Information
3434

3535
.. |codecov| image:: https://img.shields.io/codecov/c/github/sandialabs/sdynpy?label=Codecov&logo=codecov
3636
:target: https://codecov.io/gh/sandialabs/sdynpy
37+
38+
.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/sandialabs/sdynpy?label=Codefactor&logo=codefactor
39+
:target: https://www.codefactor.io/repository/github/sandialabs/sdynpy
40+
41+
.. |docker| image:: https://img.shields.io/docker/v/dprohe/sdynpy?color=0db7ed&label=Docker%20Hub&logo=docker&logoColor=0db7ed
42+
:target: https://hub.docker.com/r/dprohe/sdynpy

0 commit comments

Comments
 (0)