Skip to content

Commit

Permalink
update CI: push the tagged image
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Jun 21, 2021
1 parent 13b7ee2 commit 704a28e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ jobs:
git config --global user.name "srm-devops CI" &&\
git config --global user.email "srm-devops-ci@localhost" &&\
cd srm-devops &&\
if [ "${TAG_NAME}" == "" ]; then
VALUES_AUTO_UPDATED_FILE="helm/${CHART_NAME}/values.auto-updated.yaml"
IMAGE="ghcr.io/whiletrue-industries/${IMAGE_NAME}:${GITHUB_SHA}"
else
VALUES_AUTO_UPDATED_FILE="helm/${CHART_NAME}/values.auto-updated.production.yaml"
VALUES_AUTO_UPDATED_FILE="helm/${CHART_NAME}/values.auto-updated.yaml" &&\
IMAGE="ghcr.io/whiletrue-industries/${IMAGE_NAME}:${GITHUB_SHA}" &&\
if [ "${TAG_NAME}" != "" ]; then
VALUES_AUTO_UPDATED_FILE="helm/${CHART_NAME}/values.auto-updated.production.yaml" &&\
docker tag "${IMAGE}" "ghcr.io/whiletrue-industries/${IMAGE_NAME}:${TAG_NAME}-${GITHUB_SHA}" &&\
docker push "ghcr.io/whiletrue-industries/${IMAGE_NAME}:${TAG_NAME}-${GITHUB_SHA}" &&\
IMAGE="ghcr.io/whiletrue-industries/${IMAGE_NAME}:${TAG_NAME}-${GITHUB_SHA}"
fi &&\
bin/update_yaml.py '{"'"${CHART_NAME}"'":{"image":"'"${IMAGE}"'"}}' "${VALUES_AUTO_UPDATED_FILE}" &&\
Expand Down

0 comments on commit 704a28e

Please sign in to comment.