Skip to content

Commit

Permalink
only run release to docker when containing [release]
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed Jan 7, 2024
1 parent ca36761 commit ef2ea99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
jobs:
build-amd64:
runs-on: ubuntu-latest
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
strategy:
matrix:
architecture: [amd64]
Expand All @@ -32,6 +34,8 @@ jobs:
run: docker buildx imagetools create -t kerberos/agent-dev:latest kerberos/agent-dev:arch-$(echo ${{matrix.architecture}} | tr / -)-$(echo $GITHUB_SHA | cut -c1-7)
build-other:
runs-on: ubuntu-latest
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
strategy:
matrix:
#architecture: [arm64, arm/v7, arm/v6]
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Docker master build

on:
push:
# If pushed to master branch.
branches: [ master ]

env:
Expand All @@ -10,6 +11,8 @@ env:
jobs:
build-amd64:
runs-on: ubuntu-latest
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
permissions:
contents: write
strategy:
Expand Down Expand Up @@ -68,6 +71,8 @@ jobs:
# run: tar -xf agent-${{matrix.architecture}}.tar && snapcraft
build-other:
runs-on: ubuntu-latest
# If contains the keyword "[release]" in the commit message.
if: "contains(github.event.head_commit.message, '[release]')"
permissions:
contents: write
needs: build-amd64
Expand Down

0 comments on commit ef2ea99

Please sign in to comment.