chore: bump dependency versions and add daily updater workflow
Bumps every entry in contrib/dependencies.json to its latest upstream release. Adds a scheduled GitHub Actions workflow that checks each dependency once a day and opens one PR per outdated entry.
This commit is contained in:
108
.github/workflows/dependency-updates.yml
vendored
Normal file
108
.github/workflows/dependency-updates.yml
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
---
|
||||
name: 'dependency-updates'
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: prepare
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
matrix: ${{ steps.matrix.outputs.matrix }}
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Build dependency matrix
|
||||
id: matrix
|
||||
run: |
|
||||
matrix=$(jq -c '
|
||||
[
|
||||
(.dependencies[] | {section: "dependencies", name, version, url: .urls.amd64}),
|
||||
(.predependencies[] | {section: "predependencies", name, version, url: .urls.amd64}),
|
||||
(.recommendations[] | {section: "recommendations", name, version, url: .urls.amd64})
|
||||
]
|
||||
| map(. + {repo: (.url | capture("https://github.com/(?<r>[^/]+/[^/]+)/releases").r)})
|
||||
| map(del(.url))
|
||||
| {include: .}
|
||||
' contrib/dependencies.json)
|
||||
echo "matrix=${matrix}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
update:
|
||||
name: 'update / ${{ matrix.name }}'
|
||||
runs-on: ubuntu-24.04
|
||||
needs: prepare
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
||||
concurrency:
|
||||
group: dependency-updates-${{ matrix.name }}
|
||||
cancel-in-progress: false
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Resolve latest release
|
||||
id: latest
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO: ${{ matrix.repo }}
|
||||
CURRENT: ${{ matrix.version }}
|
||||
run: |
|
||||
tag=$(gh release view --repo "$REPO" --json tagName -q .tagName)
|
||||
latest="${tag#v}"
|
||||
echo "latest=${latest}" >> "$GITHUB_OUTPUT"
|
||||
if dpkg --compare-versions "$latest" gt "$CURRENT"; then
|
||||
echo "outdated=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "outdated=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Bump dependency entry
|
||||
if: steps.latest.outputs.outdated == 'true'
|
||||
env:
|
||||
SECTION: ${{ matrix.section }}
|
||||
NAME: ${{ matrix.name }}
|
||||
OLD: ${{ matrix.version }}
|
||||
NEW: ${{ steps.latest.outputs.latest }}
|
||||
run: |
|
||||
tmp=$(mktemp)
|
||||
jq --arg section "$SECTION" \
|
||||
--arg name "$NAME" \
|
||||
--arg old "$OLD" \
|
||||
--arg new "$NEW" '
|
||||
($old) as $oldv |
|
||||
($new) as $newv |
|
||||
(.[$section]) |= map(
|
||||
if .name == $name then
|
||||
.version = $newv
|
||||
| .urls.amd64 |= (gsub("v" + $oldv; "v" + $newv) | gsub($oldv; $newv))
|
||||
| .urls.arm64 |= (gsub("v" + $oldv; "v" + $newv) | gsub($oldv; $newv))
|
||||
else . end
|
||||
)
|
||||
' contrib/dependencies.json > "$tmp"
|
||||
mv "$tmp" contrib/dependencies.json
|
||||
|
||||
- name: Open pull request
|
||||
if: steps.latest.outputs.outdated == 'true'
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: chore/bump-${{ matrix.name }}-${{ steps.latest.outputs.latest }}
|
||||
base: ${{ github.ref_name }}
|
||||
delete-branch: true
|
||||
commit-message: 'chore: bump ${{ matrix.name }} to ${{ steps.latest.outputs.latest }}'
|
||||
title: 'chore: bump ${{ matrix.name }} to ${{ steps.latest.outputs.latest }}'
|
||||
body: |
|
||||
Bumps `${{ matrix.name }}` from `${{ matrix.version }}` to `${{ steps.latest.outputs.latest }}`.
|
||||
|
||||
Release notes: https://github.com/${{ matrix.repo }}/releases/tag/v${{ steps.latest.outputs.latest }}
|
||||
labels: dependencies
|
||||
@@ -2,94 +2,94 @@
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "docker-container-healthchecker",
|
||||
"version": "0.14.0",
|
||||
"version": "0.15.0",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/docker-container-healthchecker/releases/download/v0.14.0/docker-container-healthchecker-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/docker-container-healthchecker/releases/download/v0.14.0/docker-container-healthchecker-linux-arm64"
|
||||
"amd64": "https://github.com/dokku/docker-container-healthchecker/releases/download/v0.15.0/docker-container-healthchecker-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/docker-container-healthchecker/releases/download/v0.15.0/docker-container-healthchecker-linux-arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "docker-image-labeler",
|
||||
"version": "0.8.1",
|
||||
"version": "0.9.0",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/docker-image-labeler/releases/download/v0.8.1/docker-image-labeler-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/docker-image-labeler/releases/download/v0.8.1/docker-image-labeler-linux-arm64"
|
||||
"amd64": "https://github.com/dokku/docker-image-labeler/releases/download/v0.9.0/docker-image-labeler-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/docker-image-labeler/releases/download/v0.9.0/docker-image-labeler-linux-arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "lambda-builder",
|
||||
"version": "0.9.1",
|
||||
"version": "0.9.2",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/lambda-builder/releases/download/v0.9.1/lambda-builder-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/lambda-builder/releases/download/v0.9.1/lambda-builder-linux-arm64"
|
||||
"amd64": "https://github.com/dokku/lambda-builder/releases/download/v0.9.2/lambda-builder-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/lambda-builder/releases/download/v0.9.2/lambda-builder-linux-arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "netrc",
|
||||
"version": "0.10.2",
|
||||
"version": "0.10.3",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/netrc/releases/download/v0.10.2/netrc-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/netrc/releases/download/v0.10.2/netrc-linux-arm64"
|
||||
"amd64": "https://github.com/dokku/netrc/releases/download/v0.10.3/netrc-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/netrc/releases/download/v0.10.3/netrc-linux-arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "procfile-util",
|
||||
"version": "0.20.3",
|
||||
"version": "0.20.4",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/procfile-util/releases/download/v0.20.3/procfile-util-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/procfile-util/releases/download/v0.20.3/procfile-util-linux-arm64"
|
||||
"amd64": "https://github.com/dokku/procfile-util/releases/download/v0.20.4/procfile-util-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/procfile-util/releases/download/v0.20.4/procfile-util-linux-arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sshcommand",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.1",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/sshcommand/releases/download/v0.20.0/sshcommand",
|
||||
"arm64": "https://github.com/dokku/sshcommand/releases/download/v0.20.0/sshcommand"
|
||||
"amd64": "https://github.com/dokku/sshcommand/releases/download/v0.20.1/sshcommand",
|
||||
"arm64": "https://github.com/dokku/sshcommand/releases/download/v0.20.1/sshcommand"
|
||||
}
|
||||
}
|
||||
],
|
||||
"predependencies": [
|
||||
{
|
||||
"name": "gliderlabs-sigil",
|
||||
"version": "0.11.4",
|
||||
"version": "0.12.0",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/gliderlabs/sigil/releases/download/v0.11.4/sigil-linux-amd64",
|
||||
"arm64": "https://github.com/gliderlabs/sigil/releases/download/v0.11.4/sigil-linux-arm64"
|
||||
"amd64": "https://github.com/gliderlabs/sigil/releases/download/v0.12.0/sigil-linux-amd64",
|
||||
"arm64": "https://github.com/gliderlabs/sigil/releases/download/v0.12.0/sigil-linux-arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "plugn",
|
||||
"version": "0.16.0",
|
||||
"version": "0.17.0",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/plugn/releases/download/v0.16.0/plugn-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/plugn/releases/download/v0.16.0/plugn-linux-arm64"
|
||||
"amd64": "https://github.com/dokku/plugn/releases/download/v0.17.0/plugn-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/plugn/releases/download/v0.17.0/plugn-linux-arm64"
|
||||
}
|
||||
}
|
||||
],
|
||||
"recommendations": [
|
||||
{
|
||||
"name": "dokku-event-listener",
|
||||
"version": "0.17.2",
|
||||
"version": "0.19.0",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/dokku-event-listener/releases/download/v0.17.2/dokku-event-listener-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/dokku-event-listener/releases/download/v0.17.2/dokku-event-listener-linux-arm64"
|
||||
"amd64": "https://github.com/dokku/dokku-event-listener/releases/download/v0.19.0/dokku-event-listener-linux-amd64",
|
||||
"arm64": "https://github.com/dokku/dokku-event-listener/releases/download/v0.19.0/dokku-event-listener-linux-arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dokku-update",
|
||||
"version": "0.9.6",
|
||||
"version": "0.9.8",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/dokku/dokku-update/releases/download/v0.9.6/dokku-update",
|
||||
"arm64": "https://github.com/dokku/dokku-update/releases/download/v0.9.6/dokku-update"
|
||||
"amd64": "https://github.com/dokku/dokku-update/releases/download/v0.9.8/dokku-update",
|
||||
"arm64": "https://github.com/dokku/dokku-update/releases/download/v0.9.8/dokku-update"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "herokuish",
|
||||
"version": "0.11.8",
|
||||
"version": "0.11.11",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.8/herokuish_0.11.8_linux_x86_64.tgz",
|
||||
"arm64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.8/herokuish_0.11.8_linux_x86_64.tgz"
|
||||
"amd64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.11/herokuish_0.11.11_linux_x86_64.tgz",
|
||||
"arm64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.11/herokuish_0.11.11_linux_x86_64.tgz"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user