-
-
Notifications
You must be signed in to change notification settings - Fork 960
47 lines (40 loc) · 1.69 KB
/
deps.yaml
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
name: deps
on:
schedule:
- cron: '0 10 * * 1' # At 10:00, every Monday
jobs:
zsh-async:
name: Update zsh-async
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout Repo
uses: actions/checkout@v4
- name: 👀 Check zsh-async Releases
id: zsh-async
run: |
echo release_tag=$(curl -sL https://api.github.com/repos/mafredri/zsh-async/releases/latest | jq -r ".tag_name") >> $GITHUB_OUTPUT
echo current_tag=$(grep '# version:' ./lib/async.zsh | cut -d':' -f2 | xargs) >> $GITHUB_OUTPUT
- name: 📦 Update zsh-async
if: steps.zsh-async.outputs.current_tag != steps.zsh-async.outputs.release_tag
env:
RELEASE_TAG: ${{ steps.zsh-async.outputs.release_tag }}
run: |
# Download the release
curl -sL -o $RELEASE_TAG https://api.github.com/repos/mafredri/zsh-async/tarball/$RELEASE_TAG
# Extract a async.zsh file from the release
tar -xzvf $RELEASE_TAG --strip-components=1 $(tar -tzf $RELEASE_TAG | head -1 | cut -f1 -d"/")/async.zsh
# Remove archive
rm $RELEASE_TAG
- name: ↩️ Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: |
build(zsh-async): Update zsh-async to ${{ steps.zsh-async.outputs.release_tag }}
title: |
build(zsh-async): Update zsh-async to ${{ steps.zsh-async.outputs.release_tag }}
body: |
Updates [zsh-async][1] to ${{ steps.zsh-async.outputs.release_tag }}
[1]: https://github.com/mafredri/zsh-async
labels: async, dependencies
branch: zsh-async-bump
delete-branch: true