Files
AS_Network_List/.github/actions/gitReset/action.yaml
2026-03-27 19:11:52 +01:00

18 lines
562 B
YAML

runs:
using: "composite"
steps:
- name: Git reset, clean, pull
shell: bash
run: |
daily_branch=`date "+%Y%m%d"`
if [ -n "${{ env.CUSTOM_BRANCH }}" ]; then
git reset --hard
git clean -fdx
git checkout "${daily_branch}" 2>/dev/null || git checkout -b "${daily_branch}"
git pull origin "${daily_branch}" || true
git push --set-upstream origin "${daily_branch}"
fi
git reset --hard
git clean -fdx
git pull