Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add automatic dependency updater #3516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/deps-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Dependency updater

on:
schedule:
- cron: '0 0 * * 0'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

concurrency:
group: deps-updater
cancel-in-progress: true

permissions:
contents: read

jobs:
issue:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Copy link
Collaborator

@fhanau fhanau Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use tag @v4, which generally results in using the latest patch release in the 4.x series, as we currently do with various actions in the other workflows. (There are some concerns about specifying a tag as malicious actors could change the tag to point to a different commit as a supply chain attack but this is unlikely with a repo owned by GitHub itself.)

- name: Update dependencies
run: build/deps/update-deps.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard to understand how that works but I would love to see separate PRs for each dependency, would be easier to deconflict.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically this will run the shell script, if there are any tracking changes, the next workflow step will execute and it will open a pull-request.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to see separate PRs for each dependency

This might be hard to implement since we might have to deduplicate the dependency list in this workflow file as well (to use in matrix)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use dependabot instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT Dependabot doesn't execute custom scripts (build/deps/update-deps.py). We can use dependabot for package.json, but not for our update-deps related dependencies. I'll open another PR for adding dependabot for package.json

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've gotten dependabot PRs before, I think it's already set up in some capacity.

- name: Open pull request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e #v6.0.5
with:
commit-message: "update dependencies to latest version"
branch: "automatic-update-deps"
title: "Update dependencies"
body: |
This is an automated pull request for updating the dependencies of workerd.
delete-branch: true
Loading