Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(platfor-313): use official github tooling for upgrade PRs

Tre Dubrava2c33745b65c5
diff --git a/.github/workflows/generate-upgrade-impact.yml b/.github/workflows/generate-upgrade-impact.yml
index 980f794ca3..d66b675b80 100644
--- a/.github/workflows/generate-upgrade-impact.yml
+++ b/.github/workflows/generate-upgrade-impact.yml
@@ -68,14 +68,31 @@ jobs:
- name: Open upgrade impact PR
if: steps.release.outputs.stable == 'true'
- uses: peter-evans/create-pull-request@v7
- with:
- token: ${{ secrets.UPGRADE_IMPACT_PR_TOKEN }}
- branch: chore/upgrade-impact-${{ steps.release.outputs.tag }}
- base: main
- title: "chore: add upgrade impact for ${{ steps.release.outputs.tag }}"
- commit-message: "chore: add upgrade impact for ${{ steps.release.outputs.tag }}"
- body: |
- Generated self-hosted upgrade impact data for `${{ steps.release.outputs.tag }}`.
-
- Review the generated JSON for self-hosted upgrade accuracy before merging.
+ env:
+ GH_TOKEN: ${{ secrets.UPGRADE_IMPACT_PR_TOKEN }}
+ TAG_NAME: ${{ steps.release.outputs.tag }}
+ run: |
+ BRANCH_NAME="chore/upgrade-impact-${TAG_NAME}"
+ PR_TITLE="chore: add upgrade impact for ${TAG_NAME}"
+
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+
+ git switch -c "$BRANCH_NAME"
+ git add upgrade-impact/data
+
+ if git diff --cached --quiet; then
+ echo "No upgrade impact data changes detected."
+ exit 0
+ fi
+
+ git commit -m "$PR_TITLE"
+ git push --set-upstream origin "$BRANCH_NAME"
+
+ gh pr create \
+ --base main \
+ --head "$BRANCH_NAME" \
+ --title "$PR_TITLE" \
+ --body "Generated self-hosted upgrade impact data for \`${TAG_NAME}\`.
+
+ Review the generated JSON for self-hosted upgrade accuracy before merging."