File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,21 @@ jobs:
2020 run : |
2121 git config --global user.name "github-actions[bot]"
2222 git config --global user.email "github-actions[bot]@users.noreply.github.com"
23+
2324 git clone https://github.com/jsknnr/helm-charts.git
2425 cd helm-charts/charts
26+
2527 [ ! -d "${{env.CHART_NAME}}" ] && mkdir "${{env.CHART_NAME}}"
2628 cp -r ../../helm/* ./"${{env.CHART_NAME}}"/
27- git remote set-url origin 'https://${{secrets.ACTIONS_GITHUB_TOKEN}}@github.com/jsknnr/helm-charts.git'
29+
30+ git remote set-url origin "https://${{secrets.ACTIONS_GITHUB_TOKEN}}@github.com/jsknnr/helm-charts.git"
31+
2832 git add .
29- git commit -m "Automated commit from GitHub Actions for ${{env.CHART_NAME}}"
30- git push origin main
33+
34+ # Only commit if there are changes
35+ if git diff-index --quiet HEAD --; then
36+ echo "No changes to commit"
37+ else
38+ git commit -m "Automated commit from GitHub Actions for ${{env.CHART_NAME}}"
39+ git push origin main
40+ fi
You can’t perform that action at this time.
0 commit comments