GITHUB_SERVER_URL とは何か?
GITHUB_SERVER_URL は、GitHub インスタンスのベース Web URL で、例: https://github.com です。
GITHUB_SERVER_URL を使うと、ドメインをハードコードする代わりに、github.com と GitHub Enterprise Server の両方で機能するリンクを組み立てられます。
例
commit へのポータブルなリンクを組み立てます。
shell
echo "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"重要なポイント
- GITHUB_SERVER_URL は GitHub のベース URL です。
- GitHub Enterprise では異なります。
- github.com をハードコードする代わりに使います。
関連ガイド
What Is GITHUB_API_URL?GITHUB_API_URL is the REST API base URL in a GitHub Actions run. Learn how to use it for portable API calls.
What Is GITHUB_REPOSITORY?GITHUB_REPOSITORY is the owner/name slug of the repo running a GitHub Actions workflow, like octocat/hello-wo…
What Is GITHUB_SHA?GITHUB_SHA is the commit SHA that triggered a GitHub Actions workflow run. Learn what it contains and how to…