-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
51 lines (47 loc) · 1.64 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "boywithkeyboard's updater"
description: "Keep the dependencies of your Deno project up-to-date."
branding:
icon: "package"
color: "gray-dark"
inputs:
commitMessage:
description: "The commit message and the title for the pull request."
required: false
default: "deno: update imports"
allowBreaking:
description: "Allow breaking updates (major releases)."
required: false
default: "false"
allowUnstable:
description: "Allow unstable updates (prereleases)."
required: false
default: "false"
runs:
using: composite
steps:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Update Dependencies
shell: bash
env:
ALLOW_BREAKING: ${{ inputs.allowBreaking }}
ALLOW_UNSTABLE: ${{ inputs.allowUnstable }}
run: |
deno run -Ar --import-map=https://deno.land/x/update/deno.json https://deno.land/x/update/mod.ts -c --breaking=$ALLOW_BREAKING --unstable=$ALLOW_UNSTABLE
CHANGELOG=$(cat updates_changelog.md)
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
rm updates_changelog.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: ${{ inputs.commitMessage }}
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
committer: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
commit-message: ${{ inputs.commitMessage }}
body: ${{ env.CHANGELOG }}
delete-branch: true
branch: deno/imports