Skip to content

Commit 227cad6

Browse files
committed
Update github workflows for backend docker build
1 parent 7791d13 commit 227cad6

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build Latest Backend Docker Image
2+
3+
defaults:
4+
run:
5+
working-directory: ./SBOLCanvasBackend
6+
7+
on:
8+
pull_request:
9+
types: [opened, synchronize, reopened, closed]
10+
branches:
11+
- final
12+
13+
jobs:
14+
build-and-push:
15+
name: Build image and push to Docker Hub
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
name: Checkout source code
20+
- name: Build the Docker image
21+
run: |
22+
docker build . --tag synbiohub/sbolcanvas:backend
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Latest Backend Docker Image
2+
3+
4+
defaults:
5+
run:
6+
working-directory: ./SBOLCanvasBackend
7+
8+
on:
9+
push:
10+
branches: [ final ]
11+
workflow_dispatch:
12+
13+
jobs:
14+
build-and-push:
15+
name: Build image and push to Docker Hub
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
name: Checkout source code
20+
- name: Build the Docker image
21+
run: |
22+
docker build . --tag synbiohub/sbolcanvas:backend
23+
- uses: azure/docker-login@v1
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
- name: Push the image to Docker Hub
28+
run: |
29+
docker push synbiohub/sbolcanvas:backend
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Newest Release Docker Image
2+
3+
4+
defaults:
5+
run:
6+
working-directory: ./SBOLCanvasBackend
7+
8+
on:
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
build-and-push:
14+
name: Build image and push to Docker Hub
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
name: Checkout source code
19+
- name: Build the Docker image
20+
run: |
21+
RELEASE=$(echo $GITHUB_REF | cut -d'/' -f 3)
22+
docker build . --tag synbiohub/sbolcanvas:backend-$RELEASE
23+
- uses: azure/docker-login@v1
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
- name: Push the image to Docker Hub
28+
run: |
29+
RELEASE=$(echo $GITHUB_REF | cut -d'/' -f 3)
30+
docker push synbiohub/sbolcanvas:backend-$RELEASE

0 commit comments

Comments
 (0)