Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

Commit 4385a90

Browse files
committed
Rename shortSHA -> IMAGE_TAG
1 parent f854f5a commit 4385a90

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ The GitHub Package Registry allows you to develop your code and host your packag
2020

2121
This Action will automatically tag each image as follows:
2222

23-
{Image_Name}:{shortSHA}
23+
{Image_Name}:{IMAGE_TAG}
2424

2525
Where:
2626
- `Image_Name` is provided by the user as an input.
27-
- `shortSHA` is either the first 12 characters of the GitHub commit SHA or the value of IMAGE_TAG env variable
27+
- `IMAGE_TAG` is either the first 12 characters of the GitHub commit SHA or the value of INPUT_IMAGE_TAG env variable
2828

2929
## Usage
3030

@@ -83,7 +83,7 @@ jobs:
8383

8484
You can reference the outputs of an action using [expression syntax](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions), as illustrated in the Example Pipeline above.
8585

86-
1. `IMAGE_SHA_NAME`: This is the `{Image_Name}:{shortSHA}` as described above.
86+
1. `IMAGE_SHA_NAME`: This is the `{Image_Name}:{IMAGE_TAG}` as described above.
8787
2. `IMAGE_URL`: This is the URL on GitHub where you can view your hosted Docker images. This will always be located at `https://github.com/{OWNER}/{REPOSITORY}/packages` in reference to the repository where the action was called.
8888

8989
These outputs are merely provided as convenience incase you want to use these values in subsequent steps.

entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ if [[ -z "$INPUT_BUILD_CONTEXT" ]]; then
3333
fi
3434

3535
if [[ -z "$INPUT_IMAGE_TAG" ]]; then
36-
shortSHA=$(echo "${GITHUB_SHA}" | cut -c1-12)
36+
IMAGE_TAG=$(echo "${GITHUB_SHA}" | cut -c1-12)
3737
else
38-
shortSHA=$INPUT_IMAGE_TAG
38+
IMAGE_TAG=$INPUT_IMAGE_TAG
3939
fi
4040

4141
# The following environment variables will be provided by the environment automatically: GITHUB_REPOSITORY, GITHUB_SHA
@@ -45,7 +45,7 @@ echo ${INPUT_PASSWORD} | docker login -u ${INPUT_USERNAME} --password-stdin dock
4545

4646
# Set Local Variables
4747
BASE_NAME="docker.pkg.github.com/${GITHUB_REPOSITORY}/${INPUT_IMAGE_NAME}"
48-
SHA_NAME="${BASE_NAME}:${shortSHA}"
48+
SHA_NAME="${BASE_NAME}:${IMAGE_TAG}"
4949

5050
# Add Arguments For Caching
5151
BUILDPARAMS=""

0 commit comments

Comments
 (0)