-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 2.06 KB
/
update.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: Update
on:
schedule:
- cron: '0 12 * * *'
permissions:
repository-projects: read
pull-requests: write
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Authenticate GitHub CLI
run: echo ${{github.token}} | gh auth login --with-token
- name: Get Gitmoji Release Information
id: release
run: |
output=$(gh release view --repo carloscuesta/gitmoji --json tagName,tarballUrl)
tarball=$(echo ${output} | jq -r .tarballUrl)
version=$(echo ${output} | jq -r .tagName)
echo "version=${version}" >> ${GITHUB_OUTPUT}
echo "tarball=${tarball}" >> ${GITHUB_OUTPUT}
- name: Update gitmojis.json
run: >-
curl -L ${{ steps.release.outputs.tarball }}
| tar --extract --gunzip --no-anchored
--transform='flags=r;s|packages/gitmojis/src/gitmojis.json|gitmojis.json|'
--directory=${{github.workspace}}/autoload
--strip-components=1
gitmojis.json
- name: Create Pull Request
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7
with:
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: github-actions/gitmoji.dev/gitmoji
delete-branch: true
commit-message: Bump gitmojis.json to ${{ steps.release.outputs.version }}
title: ⬆ Bump gitmojis.json to ${{ steps.release.outputs.version }}
body: |
Bumps [gitmoji](https://github.com/carloscuesta/gitmoji) to ${{steps.release.outputs.version}}
See the [release notes][1] for more information.
[1]: https://github.com/carloscuesta/gitmoji/releases/tag/${{steps.release.outputs.version}}
labels: dependencies,upstream
assignees: bruxisma
reviewers: bruxisma