mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Fix CI not attaching a "View deployment" button in PRs for build links
This commit is contained in:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -157,18 +157,21 @@ jobs:
|
||||
REF="master"
|
||||
ENVIRONMENT="graphite-dev (Production)"
|
||||
else
|
||||
REF="$(git rev-parse HEAD)"
|
||||
REF="${{ inputs.checkout_ref || github.head_ref || github.ref_name }}"
|
||||
ENVIRONMENT="graphite-dev (Preview)"
|
||||
fi
|
||||
DEPLOY_ID=$(gh api \
|
||||
create_deployment() {
|
||||
gh api \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
repos/${{ github.repository }}/deployments \
|
||||
--input - \
|
||||
--jq '.id' <<EOF
|
||||
{"ref":"$REF","environment":"$ENVIRONMENT","auto_merge":false,"required_contexts":[]}
|
||||
{"ref":"$1","environment":"$ENVIRONMENT","auto_merge":false,"required_contexts":[]}
|
||||
EOF
|
||||
)
|
||||
}
|
||||
# Try branch name first (needed for GitHub's PR "View deployment" button), fall back to commit SHA if the branch was deleted
|
||||
DEPLOY_ID=$(create_deployment "$REF" 2>/dev/null) || DEPLOY_ID=$(create_deployment "$(git rev-parse HEAD)")
|
||||
gh api \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{#if $tooltip.visible}
|
||||
<Tooltip />
|
||||
{/if}
|
||||
{#if import.meta.env.MODE === "native" && new Date() > new Date("2026-04-30")}
|
||||
{#if import.meta.env.MODE === "native" && new Date() > new Date("2026-07-01")}
|
||||
<LayoutCol class="release-candidate-expiry">
|
||||
<TextLabel>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user