Skip to content

Commit

Permalink
Merge pull request #346 from SynBioDex/workflow-updates
Browse files Browse the repository at this point in the history
Update github workflows for backend docker container
  • Loading branch information
cjmyers authored Nov 6, 2024
2 parents 7791d13 + 3ef14a8 commit 6461fe3
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ on:
paths:
- '.github/**'
- 'SBOLCanvasFrontend/**'
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- final


jobs:
build_and_deploy_job:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/build-test-backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build Latest Backend Docker Image

defaults:
run:
working-directory: ./SBOLCanvasBackend

on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- final

jobs:
build-and-push:
name: Build image and push to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout source code
- name: Build the Docker image
run: |
docker build . --tag synbiohub/sbolcanvas:backend
29 changes: 29 additions & 0 deletions .github/workflows/latest-backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Latest Backend Docker Image


defaults:
run:
working-directory: ./SBOLCanvasBackend

on:
push:
branches: [ final ]
workflow_dispatch:

jobs:
build-and-push:
name: Build image and push to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout source code
- name: Build the Docker image
run: |
docker build . --tag synbiohub/sbolcanvas:backend
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the image to Docker Hub
run: |
docker push synbiohub/sbolcanvas:backend
30 changes: 30 additions & 0 deletions .github/workflows/release-backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Newest Release Docker Image


defaults:
run:
working-directory: ./SBOLCanvasBackend

on:
release:
types: [published]

jobs:
build-and-push:
name: Build image and push to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout source code
- name: Build the Docker image
run: |
RELEASE=$(echo $GITHUB_REF | cut -d'/' -f 3)
docker build . --tag synbiohub/sbolcanvas:backend-$RELEASE
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the image to Docker Hub
run: |
RELEASE=$(echo $GITHUB_REF | cut -d'/' -f 3)
docker push synbiohub/sbolcanvas:backend-$RELEASE

0 comments on commit 6461fe3

Please sign in to comment.