Skip to content

Commit

Permalink
ci(deps): Use Molt instead of Renovate
Browse files Browse the repository at this point in the history
Renovate it too much to just update Deno dependencies.
  • Loading branch information
5ouma committed Feb 15, 2024
1 parent a002712 commit 006e727
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 25 deletions.
22 changes: 0 additions & 22 deletions .github/renovate.json

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/deps-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: 📦 Update Dependencies

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
Update:
runs-on: Ubuntu-Latest

steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@v4

- name: 🦕 Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: 📦 Install Molt
run: deno install --allow-env --allow-read --allow-write --allow-net --allow-run=git,deno --name molt https://deno.land/x/molt@/cli.ts

- name: ⬆️ Update Dependencies
id: deps
run: |
molt -w ./**/*.ts --summary=../title.txt --report=../body.md
deno task clean
- name: 🔍 Check the Result
id: result
uses: andstor/file-existence-action@v3
with:
files: ../title.txt, ../body.md

- name: 📘 Read title.txt
id: title
if: ${{ steps.result.outputs.files_exists == 'true' }}
uses: juliangruber/read-file-action@v1
with:
path: ../title.txt

- name: 📕 Read body.md
id: body
if: ${{ steps.result.outputs.files_exists == 'true' }}
uses: juliangruber/read-file-action@v1
with:
path: ../body.md

- name: 🎈 Create Pull Request
if: ${{ steps.result.outputs.files_exists == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
commit-message: |
chore(deps): ${{ steps.title.outputs.content }}
${{ steps.body.outputs.content }}
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: deps-deno
title: |
chore(deps): ${{ steps.title.outputs.content }}
body: ${{ steps.body.outputs.content }}
13 changes: 11 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
{
"$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
"fmt": {
"exclude": ["LICENSE", ".github/**/*.md"]
},
"test": {
"include": ["src/", "test/"]
},
"tasks": {
"clean": "deno fmt && deno cache --lock-write ./**/*.ts",
"gen": "deno run --allow-read --allow-write ./src/main.ts",
"test": "deno test --allow-read --allow-write"
},
"imports": {
"assert": "https://deno.land/[email protected]/assert/mod.ts",
"path": "https://deno.land/[email protected]/path/mod.ts",
"toml": "https://deno.land/[email protected]/toml/mod.ts",
"xml": "https://deno.land/x/[email protected]/mod.ts",
"case": "https://deno.land/x/[email protected]/mod.ts",
"path": "https://deno.land/[email protected]/path/mod.ts"
"xml": "https://deno.land/x/[email protected]/mod.ts"
}
}
2 changes: 1 addition & 1 deletion test/libs/convert_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals } from "assert";
import { convertToTOML, convertToOPML } from "../../src/libs/mod.ts";
import { convertToOPML, convertToTOML } from "../../src/libs/mod.ts";
import { List, Lists } from "../../src/types/mod.ts";

Deno.test("Parse TOML", () => {
Expand Down

0 comments on commit 006e727

Please sign in to comment.