mirror of
https://github.com/C24Be/AS_Network_List.git
synced 2026-01-25 23:35:41 +03:00
branches
This commit is contained in:
6
.github/actions/gitPush/action.yaml
vendored
6
.github/actions/gitPush/action.yaml
vendored
@@ -5,10 +5,16 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
timestamp=`date "+%Y.%m.%d %H:%M:%S"`
|
timestamp=`date "+%Y.%m.%d %H:%M:%S"`
|
||||||
|
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 add ${{ env.PUSH_FILES }}
|
||||||
git diff --staged --quiet || CHANGED=true
|
git diff --staged --quiet || CHANGED=true
|
||||||
|
if [ -n "${{ env.CUSTOM_BRANCH }}" ]; then
|
||||||
|
git checkout "${daily_branch}" 2>/dev/null || git checkout -b "${daily_branch}"
|
||||||
|
git pull origin "${daily_branch}"
|
||||||
|
git push --set origin "${daily_branch}"
|
||||||
|
fi
|
||||||
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
|
||||||
|
|||||||
1
.github/workflows/update_ru_all_lists.yml
vendored
1
.github/workflows/update_ru_all_lists.yml
vendored
@@ -30,3 +30,4 @@ jobs:
|
|||||||
- uses: ./.github/actions/gitPush
|
- uses: ./.github/actions/gitPush
|
||||||
env:
|
env:
|
||||||
PUSH_FILES: auto/*txt
|
PUSH_FILES: auto/*txt
|
||||||
|
CUSTOM_BRANCH: true
|
||||||
|
|||||||
Reference in New Issue
Block a user