Skip to content

Commit 99f55ce

Browse files
authored
feat: add option to push latest image (#94)
Changes the publish-chartpress-images action to optionally push images tagged with 'latest'.
1 parent 2c4339a commit 99f55ce

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

publish-chartpress-images/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ You can set these environment variables:
2929
| DOCKER_USERNAME | None | Yes |
3030
| IMAGE_PREFIX | None | No |
3131
| CHARTPRESS_SPEC_DIR | . | No |
32+
| PUSH_LATEST | None | No |
33+
34+
Note: setting the `PUSH_LATEST` variable to any non-zero value will trigger the publishing of
35+
the images with the `latest` tag.

publish-chartpress-images/publish-images.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ git config --global --add safe.directory $PWD
2121
# build and push the chart and images
2222
cd $CHARTPRESS_SPEC_DIR
2323
chartpress --push $CHART_TAG $IMAGE_PREFIX
24+
25+
if [ ! -z "$PUSH_LATEST" ]; then
26+
echo "Pushing images with 'latest' tags"
27+
chartpress --push --tag latest $IMAGE_PREFIX
28+
fi

0 commit comments

Comments
 (0)