Splitting develop vs latest docker builds; Tox config

This commit is contained in:
James Barnsley
2021-10-24 12:46:42 +13:00
parent 735e07416f
commit d8d0f234c2
2 changed files with 45 additions and 2 deletions

View File

@ -0,0 +1,43 @@
name: Build Docker
on:
push:
branches: [deploy/release,deploy/force-release]
jobs:
build-and-push-docker-image:
name: Build image and push to DockerHub
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: .
tags: |
jaedb/iris:latest
# build on feature branches, push only on master branch
push: ${{ github.ref == 'refs/heads/master' }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View File

@ -2,7 +2,7 @@ name: Build Docker
on:
push:
branches: [master,deploy/release,deploy/force-release]
branches: [develop]
jobs:
build-and-push-docker-image:
@ -35,7 +35,7 @@ jobs:
with:
context: .
tags: |
jaedb/iris:master
jaedb/iris:develop
# build on feature branches, push only on master branch
push: ${{ github.ref == 'refs/heads/master' }}