diff --git a/.github/workflows/download-missing-packages.yml b/.github/workflows/download-missing-packages.yml index 296ddda1..66335c3b 100644 --- a/.github/workflows/download-missing-packages.yml +++ b/.github/workflows/download-missing-packages.yml @@ -57,23 +57,19 @@ jobs: - name: Create Pull Request if: steps.git-check.outputs.changes == 'true' - run: | - # Create a new branch with timestamp - BRANCH_NAME="update-packages-$(date +%Y%m%d-%H%M%S)" - git checkout -b $BRANCH_NAME - - # Commit changes - git commit -m "Add new packages from repo.magento.com" + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Add new packages from repo.magento.com + title: Add new packages from repo.magento.com + body: | + This PR adds new packages downloaded from repo.magento.com by the automated workflow. - # Push to the repository - git push origin $BRANCH_NAME + Please rebuild the mirror after merging. - # Create PR using GitHub CLI - gh pr create \ - --title "Add new packages from repo.magento.com" \ - --body "This PR adds new packages downloaded from repo.magento.com by the automated workflow. Please rebuild the mirror after merging." \ - --repo "mage-os/generate-mirror-repo-js" \ - --base main \ - --head $BRANCH_NAME - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + Auto-generated by [download-missing-packages workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) + branch: update-packages + delete-branch: true + base: main + add-paths: | + resource/additional-packages/**