Skip to content

Commit e8d7299

Browse files
authored
Update and rename docker-latest.yml to docker.yml
1 parent 35b8a20 commit e8d7299

File tree

2 files changed

+59
-25
lines changed

2 files changed

+59
-25
lines changed

.github/workflows/docker-latest.yml

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

.github/workflows/docker.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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:latest
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: build-push
33+
uses: docker/build-push-action@v3.2.0
34+
with:
35+
push: true
36+
tags: dprohe/sdynpy:latest
37+
versioned:
38+
if: github.event_name == 'release'
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: tag
42+
id: tag
43+
uses: dawidd6/action-get-tag@v1
44+
with:
45+
strip_v: true
46+
- name: checkout
47+
uses: actions/checkout@v3
48+
- name: login
49+
uses: docker/login-action@v2.1.0
50+
with:
51+
username: dprohe
52+
password: ${{ secrets.DOCKERHUB_TOKEN }}
53+
- name: build-push
54+
uses: docker/build-push-action@v3.2.0
55+
with:
56+
push: true
57+
tags: |
58+
dprohe/sdynpy:${{steps.tag.outputs.tag}}
59+
dprohe/sdynpy:latest

0 commit comments

Comments
 (0)