Skip to content

Commit

Permalink
Use specific version instead of branch name (#4225)
Browse files Browse the repository at this point in the history
* Use specific version instead of branch name

* Changesets

* Use jq

* Update .github/workflows/prepare-release.yml

Co-authored-by: Mikail <[email protected]>

* Update .github/workflows/prepare-release.yml

Co-authored-by: Mikail <[email protected]>

---------

Co-authored-by: Mikail <[email protected]>
  • Loading branch information
2 people authored and poulch committed Sep 25, 2023
1 parent 0988eed commit f8ce793
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-badgers-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Use version from package.json to trigger deployment
21 changes: 12 additions & 9 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,15 @@ jobs:
export GITHUB_TOKEN=$( \
curl --request GET --url ${{ secrets.VAULT_URL}} --header "Authorization: JWT ${{ secrets.VAULT_JWT }}" | jq -r .token \
)
gh api /repos/saleor/saleor-cloud-deployments/dispatches \
--input - <<< '{
"event_type": "open-release-pull-request",
"client_payload": {
"project": "DASHBOARD",
"environment": "SANDBOX",
"version": "${{ github.ref_name }}"
}
}'
version=$(cat package.json | jq -r .version)
payload=$(jq --null-input --arg version "$version" '{
"event_type": "open-release-pull-request",
"client_payload": {
"project": "DASHBOARD",
"environment": "SANDBOX",
"version": $version
}
}')
gh api /repos/saleor/saleor-cloud-deployments/dispatches --input - <<< $payload

0 comments on commit f8ce793

Please sign in to comment.