Skip to content

Commit

Permalink
Build push :latest Docker on pushes to main.
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Nov 13, 2022
1 parent 99d067f commit 3aa619c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/docker_deployment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build and deploy Docker image

on:
push:
branches:
- 'dev'
release:
types: [created]
pull_request:
Expand All @@ -27,7 +30,7 @@ jobs:
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
if: github.event_name == 'release'
if: github.event_name == 'release' || github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
Expand All @@ -42,6 +45,16 @@ jobs:
tags: molpopgen/fwdpy11:latest, molpopgen/fwdpy11:${{ github.event.release.tag_name }}
file: deployment/docker/Dockerfile
context: .
-
name: Build and push from main
if: github.ref == 'refs/heads/main'
id: docker_bfild_main
uses: docker/build-push-action@v2
with:
push: true
tags: molpopgen/fwdpy11:latest
file: deployment/docker/Dockerfile
context: .
-
name: Build image
if: github.event_name == 'pull_request'
Expand Down

0 comments on commit 3aa619c

Please sign in to comment.