Skip to content

Commit

Permalink
Trigger deployment when the push was the new tag (#4212)
Browse files Browse the repository at this point in the history
* Trigger deployment on GH release

* Trigger deployment when the push was tag

* Trigger when has no changesets

* Trigger when has no changesets

* Publish docker image only on release
  • Loading branch information
andrzejewsky committed Sep 22, 2023
1 parent 624ea98 commit 0988eed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Prepare release with Changesets
runs-on: ubuntu-22.04
outputs:
published: ${{ steps.changesets.outputs.published }}
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}
permissions:
contents: write
pull-requests: write
Expand All @@ -39,7 +39,7 @@ jobs:
release:
name: Deploy and release to sandbox
needs: prepare
if: needs.prepare.outputs.published == 'true'
if: needs.prepare.outputs.hasChangesets == 'false'
runs-on: ubuntu-22.04
env:
API_URI: /graphql/
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/publish-containers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Publish container image

on:
push:
tags:
# Matches stable and pre-releases
- "[0-9]+.[0-9]+.[0-9]+*"
release:
types: [published]

jobs:
docker:
Expand Down

0 comments on commit 0988eed

Please sign in to comment.