Files
github-slug-action/docs/slug-url-variables.md
Romain Lespinasse aba9f8db6e feat: use GITHUB_REF_POINT as variable for the branch name (#149)
BREAKING CHANGE: Change the behavior of GITHUB_REF_NAME to match the default GitHub Action behavior,
BREAKING CHANGE: Introduce GITHUB_REF_POINT as a replacement for GITHUB_REF_NAME to match this GitHub Action behavior in v4.
2024-11-06 00:16:25 +01:00

4.2 KiB

Slug URL Variables

Table of Contents

GITHUB_REPOSITORY_SLUG_URL

Slug URL the environment variable GITHUB_REPOSITORY

The owner and repository name.

GITHUB_REPOSITORY GITHUB_REPOSITORY_SLUG_URL
octocat/Hello-World octocat-hello-world
rlespinasse/Hello-World.go rlespinasse-hello-world-go
AnotherPerson/SomeRepository anotherperson-somerepository

GITHUB_REPOSITORY_OWNER_PART_SLUG_URL

Slug URL the environment variable GITHUB_REPOSITORY_OWNER_PART

The Owner part of GITHUB_REPOSITORY variable.

GITHUB_REPOSITORY_OWNER_PART GITHUB_REPOSITORY_OWNER_PART_SLUG_URL
octocat octocat
rlespinasse rlespinasse
AnotherPerson anotherperson

GITHUB_REPOSITORY_NAME_PART_SLUG_URL

Slug URL the environment variable GITHUB_REPOSITORY_NAME_PART

The Repository name part of GITHUB_REPOSITORY variable.

GITHUB_REPOSITORY_NAME_PART GITHUB_REPOSITORY_NAME_PART_SLUG_URL
Hello-World hello-world
Hello-World.go hello-world-go
SomeRepository somerepository

GITHUB_REF_SLUG_URL

Slug URL the environment variable GITHUB_REF

The branch or tag ref that triggered the workflow. If neither a branch or tag is available for the event type, the variable will not exist.

GITHUB_REF GITHUB_REF_SLUG_URL
refs/heads/main main
refs/heads/feat/new_feature feat-new-feature
refs/tags/v1.0.0 v1-0-0
refs/pull/42/merge 42-merge
refs/tags/product@1.0.0-rc.2 product-1-0-0-rc-2
refs/heads/New_Awesome_Product new-awesome-product

GITHUB_REF_NAME_SLUG_URL

Slug URL the environment variable GITHUB_REF_NAME

The branch or tag ref that triggered the workflow. If neither a branch or tag is available for the event type, the variable will not exist.

GITHUB_REF_NAME GITHUB_REF_SLUG_URL
refs/heads/main main
refs/heads/feat/new_feature feat-new-feature
refs/tags/v1.0.0 v1-0-0
refs/pull/42/merge 42-merge
refs/tags/product@1.0.0-rc.2 product-1-0-0-rc-2
refs/heads/New_Awesome_Product new-awesome-product

GITHUB_HEAD_REF_SLUG_URL

Slug URL the environment variable GITHUB_HEAD_REF

The branch of the head repository. Only set for forked repositories.

GITHUB_REF GITHUB_HEAD_REF_SLUG_URL
refs/heads/main main
refs/heads/feat/new_feature feat-new-feature
refs/heads/New_Awesome_Product new-awesome-product

GITHUB_BASE_REF_SLUG_URL

Slug URL the environment variable GITHUB_BASE_REF

The branch of the base repository. Only set for forked repositories.

GITHUB_REF GITHUB_HEAD_REF_SLUG_URL
refs/heads/main main
refs/heads/feat/new_feature feat-new-feature
refs/heads/New_Awesome_Product new-awesome-product

GITHUB_EVENT_REF_SLUG_URL

Slug URL the variable github.event.ref

The Git reference resource associated to triggered webhook. Only set for create, and delete events.

GITHUB_REF GITHUB_HEAD_REF_SLUG_URL
refs/heads/main main
refs/heads/feat/new_feature feat-new-feature
refs/heads/New_Awesome_Product new-awesome-product