Using *release* as workflow trigger, rather than branch push
This commit is contained in:
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -3,7 +3,8 @@ name: Release
|
||||
on:
|
||||
push:
|
||||
branches: [master,develop]
|
||||
tags: '*'
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
jest:
|
||||
@ -86,7 +87,7 @@ jobs:
|
||||
name: 'Publish: PyPi'
|
||||
runs-on: ubuntu-latest
|
||||
needs: [jest, tox]
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.event_name == 'release' && github.event.action == 'created'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
@ -126,7 +127,7 @@ jobs:
|
||||
name: 'Publish: DockerHub'
|
||||
runs-on: ubuntu-latest
|
||||
needs: [jest, tox]
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.event_name == 'release' && github.event.action == 'created'
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
@ -134,13 +135,13 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Docker meta
|
||||
- name: Generating tags and labels
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: jaedb/iris
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=release
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=raw,value=latest
|
||||
|
||||
Reference in New Issue
Block a user