This commit is contained in:
Be
2024-03-03 19:29:32 +01:00
parent 6a6c5c05cb
commit 315f9b24b7

View File

@@ -8,13 +8,13 @@ runs:
daily_branch=`date "+%Y%m%d"` daily_branch=`date "+%Y%m%d"`
git config --global user.name "${{ env.REPO_OWNER }}" git config --global user.name "${{ env.REPO_OWNER }}"
git config --global user.email "${{ env.REPO_OWNER }}@github.com" git config --global user.email "${{ env.REPO_OWNER }}@github.com"
git add ${{ env.PUSH_FILES }}
git diff --staged --quiet || CHANGED=true
if [ -n "${{ env.CUSTOM_BRANCH }}" ]; then if [ -n "${{ env.CUSTOM_BRANCH }}" ]; then
git checkout "${daily_branch}" 2>/dev/null || git checkout -b "${daily_branch}" git checkout "${daily_branch}" 2>/dev/null || git checkout -b "${daily_branch}"
#git pull origin "${daily_branch}" #git pull origin "${daily_branch}"
git push --set origin "${daily_branch}" git push --set origin "${daily_branch}"
fi fi
git add ${{ env.PUSH_FILES }}
git diff --staged --quiet || CHANGED=true
if [ "$CHANGED" = true ]; then if [ "$CHANGED" = true ]; then
git commit -m "Update $timestamp" git commit -m "Update $timestamp"
git push https://${{ env.GH_PAT }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}.git git push https://${{ env.GH_PAT }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}.git