Skip to content

Commit

Permalink
Add comment to release PR after tests in CORE (#5172)
Browse files Browse the repository at this point in the history
* Add comment to release PR after tests in CORE

* Fix branch name

* Fix comment output

* Fix comment output

* Remove added values for testing purpose

* Add chagesets

* Update .changeset/fast-mirrors-mate.md

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

* Update .github/workflows/automation-tests-on-repository-dispatch.yml

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

---------

Co-authored-by: Mikail <[email protected]>
  • Loading branch information
karola312 and NyanKiyoshi authored Sep 26, 2024
1 parent 8f4d4c7 commit c665bb8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-mirrors-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

Comment from tests results will now be displayed for cloud-deployments CORE release PRs
14 changes: 14 additions & 0 deletions .github/workflows/automation-tests-on-repository-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,18 @@ jobs:
CUSTOM_VERSION: ${{github.event.client_payload.custom_version }}
ADDITIONAL_TITLE: "Core automation test"
secrets: inherit

add-comment-to-release-pr:
needs: run-tests-on-release
runs-on: ubuntu-22.04
steps:
- name: add-comment-to-release-pr
env:
PR_NUMBER: ${{github.event.client_payload.release_pr }}
PR_COMMENT: ${{needs.run-tests-on-release.outputs.PR_COMMENT}}
run: |
export GITHUB_TOKEN=$( \
curl --request GET --url ${{ secrets.VAULT_URL}} --header "Authorization: JWT ${{ secrets.VAULT_JWT }}" | jq -r .token \
)
gh pr comment "$PR_NUMBER" --body "$PR_COMMENT" -R github.com/saleor/saleor-cloud-deployments
4 changes: 4 additions & 0 deletions .github/workflows/run-tests-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ on:
RUN_URL:
value: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
description: Url to job run
PR_COMMENT:
value: ${{ jobs.tests-complete.outputs.PR_COMMENT }}
description: Comment for release PR

jobs:
add-check-and-prepare-instance:
Expand Down Expand Up @@ -233,6 +236,7 @@ jobs:
timeout-minutes: 30
outputs:
TESTS_CONCLUSION: "${{ steps.send-slack-message.outputs.status }}"
PR_COMMENT: "${{ steps.send-slack-message.outputs.status }} - run details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit c665bb8

Please sign in to comment.