Skip to content

Instantly share code, notes, and snippets.

@kawarimidoll
Last active December 1, 2021 15:12
Show Gist options
  • Save kawarimidoll/2f43533e5fbe319f4bc9bb255c73a02d to your computer and use it in GitHub Desktop.
Save kawarimidoll/2f43533e5fbe319f4bc9bb255c73a02d to your computer and use it in GitHub Desktop.
Auto-Update Deno Dependencies

Auto-Update Deno Dependencies

Create .github/workflows/udd.yml. This workflow checks updates of the modules imported in all .ts files and creates PR like this.

If you want just to check update dependencies, use cdd.yml instead of udd.yml. Running cdd.yml fails when there is updates, then you can get a notification.

name: check-deno-dependencies
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
udd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: denoland/setup-deno@v1
- name: Check dependencies
run: >
! deno run -A https://deno.land/x/udd/main.ts
$(find . -name "*.ts") --test="deno test -Ar"
--dry-run | grep -A 100 'Able to update'
name: update-deno-dependencies
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
udd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: denoland/setup-deno@v1
- name: Update dependencies
run: >
deno run -A https://deno.land/x/udd/main.ts
$(find . -name "*.ts") --test="deno test -Ar"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "chore(deps): update deno dependencies"
title: Update Deno Dependencies
body: >
Automated updates by [deno-udd](https://github.com/hayd/deno-udd)
and [create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action
branch: update-deno-dependencies
author: GitHub <noreply@github.com>
delete-branch: true
@UltiRequiem
Copy link

@kawarimidoll
Copy link
Author

Awesome! Thank you for your mention 🥰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment