Skip to content

Commit f57526e

Browse files
authored
Merge pull request #6 from mrbuche/main
docker fix
2 parents 35b8a20 + ef0f158 commit f57526e

File tree

4 files changed

+79
-61
lines changed

4 files changed

+79
-61
lines changed

.github/workflows/docker-latest.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/docker-versioned.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/docker.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Docker
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
pull_request:
6+
branches: [ "main" ]
7+
release:
8+
types: [ "published" ]
9+
jobs:
10+
test:
11+
if: github.event_name == 'pull_request'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: checkout
15+
uses: actions/checkout@v3
16+
- name: build
17+
uses: docker/build-push-action@v3.2.0
18+
with:
19+
push: false
20+
tags: dprohe/sdynpy:test
21+
latest:
22+
if: github.event_name == 'push'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: checkout
26+
uses: actions/checkout@v3
27+
- name: login
28+
uses: docker/login-action@v2.1.0
29+
with:
30+
username: dprohe
31+
password: ${{ secrets.DOCKERHUB_TOKEN }}
32+
- name: login
33+
uses: docker/login-action@v2
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
- name: build-push
39+
uses: docker/build-push-action@v3.2.0
40+
with:
41+
push: true
42+
tags: |
43+
dprohe/sdynpy:latest
44+
ghcr.io/sandialabs/sdynpy:latest
45+
versioned:
46+
if: github.event_name == 'release'
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: tag
50+
id: tag
51+
uses: dawidd6/action-get-tag@v1
52+
with:
53+
strip_v: true
54+
- name: checkout
55+
uses: actions/checkout@v3
56+
- name: login
57+
uses: docker/login-action@v2.1.0
58+
with:
59+
username: dprohe
60+
password: ${{ secrets.DOCKERHUB_TOKEN }}
61+
- name: login
62+
uses: docker/login-action@v2
63+
with:
64+
registry: ghcr.io
65+
username: ${{ github.actor }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
- name: build-push
68+
uses: docker/build-push-action@v3.2.0
69+
with:
70+
push: true
71+
tags: |
72+
dprohe/sdynpy:${{steps.tag.outputs.tag}}
73+
dprohe/sdynpy:latest
74+
ghcr.io/sandialabs/sdynpy:${{steps.tag.outputs.tag}}
75+
ghcr.io/sandialabs/sdynpy:latest

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +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]
1+
FROM python:3.10
2+
RUN git clone --depth 1 https://github.com/sandialabs/sdynpy.git && \
3+
cd sdynpy/ && \
4+
pip install .[all]

0 commit comments

Comments
 (0)