Skip to content

Commit

Permalink
Hardcode this action's URL to github.com
Browse files Browse the repository at this point in the history
Resolves bug on enterprise instances where this action would appear to
originate from the instance (#82)
  • Loading branch information
rossjrw committed Sep 17, 2024
1 parent e50528e commit 430e3df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ runs:
echo "targetdir=$umbrella/pr-$pr" >> $GITHUB_ENV
echo "pr=$pr" >> $GITHUB_ENV
org=$(echo "$deployrepo" | cut -d "/" -f 1)
thirdleveldomain=$(echo "$deployrepo" | cut -d "/" -f 2)
repo_org=$(echo "$deployrepo" | cut -d "/" -f 1)
repo_name=$(echo "$deployrepo" | cut -d "/" -f 2)
if [ ! -z "$customurl" ]; then
pagesurl="$customurl"
elif [ "${org}.github.io" == "$thirdleveldomain" ]; then
pagesurl="${org}.github.io"
elif [ "${repo_org}.github.io" == "$repo_name" ]; then
pagesurl="${repo_org}.github.io"
else
pagesurl=$(echo "$deployrepo" | sed 's/\//.github.io\//')
fi
Expand Down Expand Up @@ -144,7 +144,7 @@ runs:
header: pr-preview
message: "\
[PR Preview Action]\
(${{ github.server_url }}/${{ env.actionrepo }})
(https://github.com/${{ env.actionrepo }})
${{ env.action_version }}
:---:
Expand Down Expand Up @@ -177,7 +177,7 @@ runs:
header: pr-preview
message: "\
[PR Preview Action]\
(${{ github.server_url }}/${{ env.actionrepo }})
(https://github.com/${{ env.actionrepo }})
${{ env.action_version }}
:---:
Expand Down

0 comments on commit 430e3df

Please sign in to comment.