From a7408a994bb82819a6395b633c24895a42b15fb8 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Wed, 14 May 2025 15:37:44 +0200 Subject: [PATCH] Workflows --- .github/workflows/move-to-main-repo.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index d25248a..fc4bde5 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -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"