Skip to content

Commit

Permalink
Make build and release mutually exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasleplus committed Apr 27, 2024
1 parent 2b6d7ff commit 030103d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ permissions:

jobs:
build:
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
steps:
- name: Set IMAGE
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/dockerrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ name: Docker Release
on:
release:
types: [published]
workflow_dispatch:

permissions: {}

jobs:
release:
if: github.ref == 'refs/heads/main'
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Set IMAGE
Expand All @@ -31,7 +30,7 @@ jobs:
type=semver,pattern={{major}}
type=sha
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
if: github.ref == 'refs/heads/main'
if: startsWith(github.ref, 'refs/tags/')
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down

0 comments on commit 030103d

Please sign in to comment.