Build Docker image for any push to develop or master

This commit is contained in:
James Barnsley
2023-01-02 21:58:32 +13:00
parent aad09b22ad
commit 3bc1ea0bb3
2 changed files with 13 additions and 3 deletions

View File

@ -127,7 +127,7 @@ jobs:
name: 'Publish: DockerHub'
runs-on: ubuntu-latest
needs: [jest, tox]
if: github.event_name == 'release'
if: github.event_name == 'release' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@ -135,7 +135,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Generating tags and labels
- name: Generating release tags and labels
if: github.event_name == 'release'
id: meta
uses: docker/metadata-action@v4
with:
@ -145,6 +146,14 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Generating branch labels
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
id: meta
uses: docker/metadata-action@v4
with:
images: jaedb/iris
tags: ${{ github.ref##*/ }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:

View File

@ -15,4 +15,5 @@ recursive-exclude src *
recursive-exclude docker *
exclude .jshintrc
exclude .babelrc
exclude jest.config.js
exclude jest.config.js
exclude .nvmrc