From 684e2921b7127ba3e8930fa9f6707bdcdc0cb80f Mon Sep 17 00:00:00 2001 From: mayur-sose Date: Wed, 11 Dec 2024 20:34:07 +0530 Subject: [PATCH] dependabot config to run script --- .github/workflows/update-packages.yml | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/update-packages.yml diff --git a/.github/workflows/update-packages.yml b/.github/workflows/update-packages.yml new file mode 100644 index 00000000..ae2945c4 --- /dev/null +++ b/.github/workflows/update-packages.yml @@ -0,0 +1,45 @@ +name: Update Packages.yml + +on: + schedule: + - cron: '0 0 * * 1' # Runs weekly on Mondays + workflow_dispatch: # Allows manual trigger of the workflow + push: + branches: [ wip ] + paths-ignore: + - .idea/** + - docs/** + +jobs: + update-packages: + runs-on: ubuntu-latest + + steps: + - name: Run Update Script + run: php update_packages.php + + - name: Commit Changes + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git add packages.yml + git commit -m "Update packages.yml with latest versions" + git push origin wip || echo "No changes to commit" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + branch: update-packages + title: Update packages.yml with latest versions + body: | + This pull request updates the `packages.yml` file with the latest stable versions of dependencies. + labels: dependencies + + run-cron: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Run script or cron job + run: php update_packages.php \ No newline at end of file