Skip to content

Commit

Permalink
update ci: use env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Jun 21, 2021
1 parent cd05770 commit bbef645
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 @@ -9,7 +9,8 @@ jobs:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SRM_DEVOPS_DEPLOY_KEY: ${{ secrets.SRM_DEVOPS_DEPLOY_KEY }}
IMAGE_NAME: srm-api
IMAGE_NAME: srm-frontend
CHART_NAME: site
run: |
BUILD_ARGS=""
if docker pull "ghcr.io/whiletrue-industries/${IMAGE_NAME}:latest"; then
Expand All @@ -29,8 +30,8 @@ jobs:
git config --global user.name "srm-devops CI" &&\
git config --global user.email "srm-devops-ci@localhost" &&\
cd srm-devops &&\
bin/update_yaml.py '{"api":{"image":"'"ghcr.io/whiletrue-industries/${IMAGE_NAME}:${GITHUB_SHA}"'"}}' helm/api/values.auto-updated.yaml &&\
git add helm/api/values.auto-updated.yaml &&\
git commit -m "update api helm chart auto updated values image" &&\
bin/update_yaml.py '{"'"${CHART_NAME}"'":{"image":"'"ghcr.io/whiletrue-industries/${IMAGE_NAME}:${GITHUB_SHA}"'"}}' "helm/${CHART_NAME}/values.auto-updated.yaml" &&\
git add "helm/${CHART_NAME}/values.auto-updated.yaml" &&\
git commit -m "update ${CHART_NAME} helm chart auto updated values image" &&\
git push origin main
fi
fi

0 comments on commit bbef645

Please sign in to comment.