-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (34 loc) · 972 Bytes
/
eseries_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: e-series Image CI
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Build dockerfile
run: |
docker build ursim/e-series --build-arg VERSION=$VERSION
env:
VERSION: latest
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Docker login
run: |
docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASSWORD}}
- name: Build dockerfile
run: |
docker build ursim/e-series --build-arg VERSION=$VERSION --tag ${{secrets.DOCKER_USER}}/ursim_docker:$VERSION
env:
VERSION: latest
- name: Push to dockerhub
run: |
docker push ${{secrets.DOCKER_USER}}/ursim_docker:$VERSION
env:
VERSION: latest