only make release when putting [release]

This commit is contained in:
Cedric Verstraeten
2024-01-07 21:41:32 +01:00
parent 751aa17534
commit 699660d472
2 changed files with 8 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ on:
jobs:
build-amd64:
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
strategy:
matrix:
@@ -30,6 +32,8 @@ jobs:
- name: Create new and append to manifest
run: cd agent && docker buildx imagetools create -t kerberos/agent-nightly:$(echo $GITHUB_SHA | cut -c1-7) kerberos/agent-nightly:arch-$(echo ${{matrix.architecture}} | tr / -)-$(echo $GITHUB_SHA | cut -c1-7)
build-other:
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
strategy:
matrix:

View File

@@ -10,8 +10,8 @@ env:
jobs:
build-amd64:
# If contains the keyword "#release" in the commit message.
if: "!contains(github.event.head_commit.message, '#release')"
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
permissions:
contents: write
@@ -70,8 +70,8 @@ jobs:
#- name: Use Snapcraft
# run: tar -xf agent-${{matrix.architecture}}.tar && snapcraft
build-other:
# If contains the keyword "#release" in the commit message.
if: ${{ !contains(github.event.head_commit.message, '#release') }}
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
permissions:
contents: write