Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Fix variable injection vulnerability in helm-release workflow (#541)

luo jiyin828c53f62d7d
diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml
index cb87ec6deb..8c28a49280 100644
--- a/.github/workflows/helm-release.yaml
+++ b/.github/workflows/helm-release.yaml
@@ -22,9 +22,12 @@ jobs:
fetch-depth: 0
- name: Configure Git
+ env:
+ GIT_USER_NAME: ${{ github.actor }}
+ GIT_USER_EMAIL: ${{ github.actor }}@users.noreply.github.com
run: |
- git config user.name "$GITHUB_ACTOR"
- git config user.email "[email protected]"
+ git config user.name "$GIT_USER_NAME"
+ git config user.email "$GIT_USER_EMAIL"
- name: Install Helm
uses: azure/setup-helm@v3
@@ -64,18 +67,21 @@ jobs:
path: gh-pages
- name: Update index and push
+ env:
+ GIT_USER_NAME: ${{ github.actor }}
+ GIT_USER_EMAIL: ${{ github.actor }}@users.noreply.github.com
run: |
# Copy packaged chart
cp .cr-release-packages/*.tgz gh-pages/
-
+
# Update index
helm repo index gh-pages --url https://we-promise.github.io/sure --merge gh-pages/index.yaml
# Push to gh-pages
- git config --global user.email "[email protected]"
- git config --global user.name "sure-admin"
git config --global credential.helper cache
cd gh-pages
+ git config user.name "$GIT_USER_NAME"
+ git config user.email "$GIT_USER_EMAIL"
git add .
git commit -m "Release nightly: ${{ steps.version.outputs.version }}"
git push