tangled
alpha
login
or
join now
tylur.dev
/
prototypey
prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey
1
fork
atom
overview
issues
pulls
pipelines
refactor update script
Tyler
3 months ago
ac3d2783
0783527c
+76
-28
2 changed files
expand all
collapse all
unified
split
.github
actions
taze-update
action.yml
workflows
update-dependencies.yml
+69
.github/actions/taze-update/action.yml
···
1
1
+
description: Automatically update dependencies using taze and create a pull request
2
2
+
3
3
+
name: Taze Update
4
4
+
5
5
+
inputs:
6
6
+
taze-input:
7
7
+
description: Flags or args to pass to taze (default: -w)
8
8
+
required: false
9
9
+
default: -w
10
10
+
branch-prefix:
11
11
+
description: Prefix for the branch name (default: chore/update-deps)
12
12
+
required: false
13
13
+
default: chore/update-deps
14
14
+
pr-title:
15
15
+
description: Title for the pull request
16
16
+
required: false
17
17
+
default: 'chore: update dependencies'
18
18
+
pr-labels:
19
19
+
description: Comma-separated labels to add to the PR
20
20
+
required: false
21
21
+
default: dependencies
22
22
+
github-token:
23
23
+
description: GitHub token for creating PRs
24
24
+
required: true
25
25
+
26
26
+
runs:
27
27
+
steps:
28
28
+
- name: Install taze
29
29
+
run: pnpm add -g taze
30
30
+
shell: bash
31
31
+
32
32
+
- name: Update dependencies
33
33
+
run: taze ${{ inputs.taze-input }}
34
34
+
shell: bash
35
35
+
36
36
+
- name: Create Pull Request
37
37
+
env:
38
38
+
GH_TOKEN: ${{ inputs.github-token }}
39
39
+
run: |
40
40
+
BRANCH_NAME="${{ inputs.branch-prefix }}-$(date +%m-%d)"
41
41
+
git config user.name "github-actions[bot]"
42
42
+
git config user.email "github-actions[bot]@users.noreply.github.com"
43
43
+
git checkout -b "$BRANCH_NAME"
44
44
+
git add .
45
45
+
if git diff --staged --quiet; then
46
46
+
echo "No dependency updates available"
47
47
+
exit 0
48
48
+
fi
49
49
+
git commit -m "${{ inputs.pr-title }}"
50
50
+
git push origin "$BRANCH_NAME"
51
51
+
52
52
+
PR_LABELS="${{ inputs.pr-labels }}"
53
53
+
LABEL_ARGS=""
54
54
+
if [ -n "$PR_LABELS" ]; then
55
55
+
IFS=',' read -ra LABELS <<< "$PR_LABELS"
56
56
+
for label in "${LABELS[@]}"; do
57
57
+
LABEL_ARGS="$LABEL_ARGS --label $(echo $label | xargs)"
58
58
+
done
59
59
+
fi
60
60
+
61
61
+
gh pr create --title "${{ inputs.pr-title }}" --body "## Automated dependency updates
62
62
+
63
63
+
This PR was automatically generated using taze.
64
64
+
65
65
+
Updates were performed using \`taze ${{ inputs.taze-input }}\`.
66
66
+
67
67
+
Please review the changes carefully before merging." $LABEL_ARGS
68
68
+
shell: bash
69
69
+
using: composite
+7
-28
.github/workflows/update-dependencies.yml
···
18
18
19
19
- uses: ./.github/actions/prepare
20
20
21
21
-
- name: Install taze
22
22
-
run: pnpm add -g taze
23
23
-
24
24
-
- name: Update dependencies
25
25
-
run: taze -w -r
26
26
-
27
27
-
- name: Create Pull Request
28
28
-
env:
29
29
-
GH_TOKEN: ${{ github.token }}
30
30
-
run: |
31
31
-
BRANCH_NAME="chore/update-deps-$(date +%m-%d)"
32
32
-
git config user.name "github-actions[bot]"
33
33
-
git config user.email "github-actions[bot]@users.noreply.github.com"
34
34
-
git checkout -b "$BRANCH_NAME"
35
35
-
git add .
36
36
-
if git diff --staged --quiet; then
37
37
-
echo "No dependency updates available"
38
38
-
exit 0
39
39
-
fi
40
40
-
git commit -m "chore: update dependencies"
41
41
-
git push origin "$BRANCH_NAME"
42
42
-
gh pr create --title "chore: update dependencies" --body "## Automated dependency updates
43
43
-
44
44
-
This PR was automatically generated by the weekly dependency update workflow.
45
45
-
46
46
-
Updates were performed using \`taze -w -r\` which updates all dependencies to their latest versions.
47
47
-
48
48
-
Please review the changes carefully before merging." --label dependencies
21
21
+
- uses: ./.github/actions/taze-update
22
22
+
with:
23
23
+
taze-flags: -rw
24
24
+
branch-prefix: update-deps
25
25
+
pr-title: "update dependencies"
26
26
+
pr-labels: dependencies
27
27
+
github-token: ${{ github.token }}