Workflows

This commit is contained in:
Michel Roegl-Brunner 2025-05-14 15:37:44 +02:00
parent 8ec5dac90c
commit a7408a994b

View File

@ -154,12 +154,11 @@ jobs:
fi
echo $script_name
grep 'https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func' ct/"$script_name".sh
sed 's|https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func|https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func|' ct/$script_name.sh
sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' ct/$script_name.sh
sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' install/$script_name-install.sh
git add .
git add . > /dev/null 2>&1
if git diff --cached --exit-code; then
echo "No changes detected, skipping commit."
exit 0
@ -169,8 +168,8 @@ jobs:
- name: Push to ProxmoxVE
run: |
# cd ProxmoxVE
# git push --no-thin origin "$branch_name"
cd ProxmoxVE
git push --no-thin origin "$branch_name"
- name: Create Pull Request in ProxmoxVE
id: create_pull_request
@ -178,20 +177,20 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
script_name="${{ steps.list_issues.outputs.script_name }}"
# gh pr create \
gh pr create \
--repo community-scripts/ProxmoxVE \
--head "$branch_name" \
--base main \
--title "$script_name" \
--body "Automated migration of $script_name from ProxmoxVED to ProxmoxVE."
# PR_NUMBER=$(gh pr list --repo community-scripts/ProxmoxVE --head "$branch_name" --json number --jq '.[].number')
# echo "PR_NUMBER=$PR_NUMBER"
# echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
PR_NUMBER=$(gh pr list --repo community-scripts/ProxmoxVE --head "$branch_name" --json number --jq '.[].number')
echo "PR_NUMBER=$PR_NUMBER"
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
- name: Comment on Issue
if: steps.create_pull_request.outputs.pr_number
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# gh issue comment ${{ steps.list_issues.outputs.issue_nr }} --body "A PR has been created for ${{ steps.list_issues.outputs.script_name }}: community-scripts/ProxmoxVE#${{ steps.create_pull_request.outputs.pr_number }}"
# gh issue edit ${{ steps.list_issues.outputs.issue_nr }} --remove-label "Migration To ProxmoxVE" --add-label "Started Migration To ProxmoxVE"
gh issue comment ${{ steps.list_issues.outputs.issue_nr }} --body "A PR has been created for ${{ steps.list_issues.outputs.script_name }}: community-scripts/ProxmoxVE#${{ steps.create_pull_request.outputs.pr_number }}"
gh issue edit ${{ steps.list_issues.outputs.issue_nr }} --remove-label "Migration To ProxmoxVE" --add-label "Started Migration To ProxmoxVE"