mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-24 17:49:03 +00:00
e8196936f9
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zach Borboa <zachborboa@gmail.com>
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
name: Update outdated packages
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 20 * * 1-4'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-dependencies:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Upgrade outdated packages
|
|
run: |
|
|
items=($(
|
|
jq -r '.[1:]' "scripts/make_release_requirements.json" |
|
|
jq -r '.[] | "\(.name)|\(.version)|\(.latest_version)"'
|
|
))
|
|
for item in "${items[@]}"; do
|
|
IFS='|' read -r "package_name" "package_version" "package_latest_version" <<< "${item}"
|
|
echo "found outdated package:"
|
|
echo "name: ${package_name}"
|
|
echo "version: ${package_version}"
|
|
echo "latest_version: ${package_latest_version}"
|
|
curl \
|
|
--request "POST" \
|
|
--silent \
|
|
--header "Accept: application/vnd.github+json" \
|
|
--header "Authorization: Bearer ${TOKEN}" \
|
|
"https://api.github.com/repos/php-curl-class/php-curl-class/actions/workflows/outdated-update-package.yml/dispatches" \
|
|
--data "{\"ref\":\"master\",\"inputs\":{\"package_name\":\"${package_name}\",\"package_version\":\"${package_latest_version}\"}}"
|
|
done
|
|
|
|
echo "done"
|
|
env:
|
|
TOKEN: ${{ secrets.GITHUB_TOKEN }} |