File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 2020 shell : bash
2121 env :
2222 LFX_TOKEN : ${{ inputs.lfx-token }}
23+ - name : Configure git user for signed commit
24+ shell : bash
25+ run : |
26+ set -euo pipefail
27+ GIT_USER_NAME="${GITHUB_ACTOR}"
28+ GIT_USER_EMAIL="${GITHUB_ACTOR}@users.noreply.github.com"
29+ git config user.name "${GIT_USER_NAME}"
30+ git config user.email "${GIT_USER_EMAIL}"
31+ - name : Commit and push changes with DCO sign-off
32+ shell : bash
33+ run : |
34+ set -euo pipefail
35+ # Stage changes (only add the generated HTML to be safe)
36+ if [ -n "${GITHUB_WORKSPACE:-}" ] && [ -f "${GITHUB_WORKSPACE}/index.html" ]; then
37+ git add "${GITHUB_WORKSPACE}/index.html"
38+ else
39+ git add -A
40+ fi
41+ # Commit only if there are staged changes
42+ if git diff --cached --quiet; then
43+ echo "No changes to commit."
44+ exit 0
45+ fi
46+ git commit -s -m "chore(calendar): update generated index.html"
47+ # Push to the current branch's upstream
48+ git push
You can’t perform that action at this time.
0 commit comments