mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-04 06:50:15 +00:00
Update check_and_update_json_date.yml
This commit is contained in:
parent
8e525611bd
commit
f498f349f3
38
.github/workflows/check_and_update_json_date.yml
vendored
38
.github/workflows/check_and_update_json_date.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "json/*.json"
|
- "json/*.json"
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0,6,12,18 * * *"
|
- cron: "0 0,6,12,18 * * *" # Viermal täglich
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
@ -38,33 +38,11 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit and push changes
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git config user.name "GitHub Action"
|
git config user.name "GitHub Bot"
|
||||||
git config user.email "action@github.com"
|
git config user.email "bot@github.com"
|
||||||
git commit -m "Update date_created in new JSON files" || echo "No changes to commit"
|
git commit -m "Update date_created in new JSON files" || echo "No changes to commit"
|
||||||
|
git push origin HEAD:${{ github.event.pull_request.head.ref }}
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@v0.6.0
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
iterate-prs:
|
|
||||||
needs: update-date
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Install GitHub CLI
|
|
||||||
run: sudo apt-get install -y gh
|
|
||||||
|
|
||||||
- name: List all open PRs
|
|
||||||
run: |
|
|
||||||
gh pr list --state open --json number,title > pr_list.json
|
|
||||||
jq -r '.[] | .number' pr_list.json > pr_numbers.txt
|
|
||||||
|
|
||||||
- name: Process each PR
|
|
||||||
run: |
|
|
||||||
while read pr_number; do
|
|
||||||
gh pr checkout $pr_number
|
|
||||||
git fetch origin
|
|
||||||
git checkout origin/$pr_number
|
|
||||||
done < pr_numbers.txt
|
|
||||||
|
Loading…
Reference in New Issue
Block a user