Skip to content

Commit

Permalink
fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Dec 15, 2020
1 parent af03f36 commit 5b1c174
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- master
tags:
- '*'
pull_request:

jobs:
Expand Down Expand Up @@ -47,7 +49,7 @@ jobs:
publish:
needs: [tests]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags') && github.event_name == 'push'
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down Expand Up @@ -80,7 +82,7 @@ jobs:

publish-docker:
needs: [tests]
if: github.ref == 'refs/heads/master' || contains(github.ref, 'tags')
if: github.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -140,7 +142,7 @@ jobs:
# Push `{VERSION}` when pushing a new tag
- name: Build and push
if: contains(github.ref, 'tags')
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: docker/build-push-action@v2
with:
context: .
Expand Down

0 comments on commit 5b1c174

Please sign in to comment.