This commit is contained in:
Michel Roegl-Brunner 2025-03-11 11:51:49 +01:00
parent 0cfc3ff575
commit 360c010447

View File

@ -27,13 +27,12 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: main ref: main
token: ${{ steps.generate-token.outputs.token }} token: ${{ github.token }}
repository: community-scripts/ProxmoxVE
- name: List Issues in Repository - name: List Issues in Repository
id: list_issues id: list_issues
env: env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }} GH_TOKEN: ${{ github.token }}
run: | run: |
echo "Filtering Issues with Label MigrationTest" echo "Filtering Issues with Label MigrationTest"
@ -78,10 +77,10 @@ jobs:
- name: Create PR if files found - name: Create PR if files found
env: env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }} TOKEN: ${{ steps.generate-token.outputs.token }}
run: | run: |
script_name="wf-test" script_name="wf-test"
target_repo="community-scripts/ProxmoxVED" target_repo="community-scripts/ProxmoxVE"
branch_name="add-script-$script_name" branch_name="add-script-$script_name"
commit_message="Add script files for $script_name" commit_message="Add script files for $script_name"
@ -89,16 +88,17 @@ jobs:
git fetch upstream git fetch upstream
git checkout -b "$branch_name" git checkout -b "$branch_name"
git checkout upstream/main ct/$script_name.sh cp "ct/$script_name.sh" .
git checkout upstream/main install/$script_name-install.sh cp "install/$script_name-install.sh" .
git checkout upstream/main json/$script_name.json cp "json/$script_name.json" .
git add . git add .
git commit -m "$commit_message" git commit -m "$commit_message"
git config --unset-all http.https://github.com/.extraheader
gh auth status
git push origin "$branch_name" git config --unset-all http.https://github.com/.extraheader
git push upstrean "$branch_name"
gh pr create --base main --head "$branch_name" --title "$commit_message" --body "This PR adds the script files for $script_name." -R $target_repo gh pr create --base main --head "$branch_name" --title "$commit_message" --body "This PR adds the script files for $script_name." -R $target_repo