From 71ac83f64de7ed8de971d98b78b3436aa3030f28 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 21 Oct 2024 10:18:13 +0200 Subject: [PATCH] snapshot workflow upgrade --- .github/workflows/snapshot.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 1ee5ea07..f1fb0520 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -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 @@ -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 }} @@ -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 }}' + })