Auto update python packages #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto update python packages | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "15 5 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update_packages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup vcpkg | |
uses: ./.github/actions/setup-vcpkg | |
- name: Format vcpkg.json | |
run: | | |
python ./scripts/update-ports.py | |
- name: Format vcpkg.json | |
run: | | |
vcpkg format-manifest --all $(find . -name "vcpkg.json") | |
git config --global user.email "updatebot@open-vcpkg" | |
git config --global user.name "Update Bot" | |
git add ports | |
git commit -m "Autoupdating ports" | |
- name: Update versions | |
run: | | |
for dir in ports/* ; do | |
vcpkg x-add-version ${dir##ports/} --overlay-ports=./ports \ | |
--x-builtin-registry-versions-dir=./versions/ \ | |
--x-builtin-ports-root=./ports | |
done | |
git add versions | |
git commit --am --no-edit | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |