Skip to content

Commit

Permalink
snapshot workflow upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
nohaapav committed Oct 21, 2024
1 parent b4f5dc1 commit 71ac83f
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
with:
node-version: 20.x

- name: πŸ”§ Upgrade packages
- name: πŸ”§ Upgrade hydration-ui sdk packages
run: |
cd hydration-ui
jq -c '.releases[]' ../release-plan.json | while read i; do
Expand All @@ -98,7 +98,8 @@ jobs:
git add package.json yarn.lock
git commit -m "$(jq '.releaseMessage' ../release-plan.json)"
- name: πŸ“ Open PR in hydration-ui repository
- name: 🧚 Open hydration-ui PR with sdk upgrade
id: cpr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.TARGET_REPO_PAT }}
Expand All @@ -115,3 +116,21 @@ jobs:
env:
PR: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}

- name: 🧚 Print hydration-ui PR details
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: 🧚 Update sdk PR with live preview link
if: ${{ steps.cpr.outputs.pull-request-number }}
uses: actions/github-script@v7
with:
script: |
github.rest.pulls.update({
pull_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '\🧚 Live preview here -> ${{ steps.cpr.outputs.pull-request-url }}'
})

0 comments on commit 71ac83f

Please sign in to comment.