Skip to content

Commit eaa7be8

Browse files
committed
πŸ‘· Schedule the API backup updates using GitHub Actions
1 parent 2aa56ab commit eaa7be8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Sync the backup with the API
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0'
6+
workflow_dispatch:
7+
8+
jobs:
9+
sync:
10+
name: Sync and create PR
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out πŸŽ‰
14+
uses: actions/checkout@v4.1.1
15+
- name: Set up Python 🐍
16+
uses: actions/setup-python@v4.7.1
17+
with:
18+
cache: pip
19+
- name: Install the package πŸ“¦
20+
run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install -e .
23+
- name: Run the `sync` command πŸš€
24+
run:
25+
gitmojis sync
26+
- name: Create pull request πŸŽ‰
27+
uses: peter-evans/create-pull-request@v5.0.2
28+
with:
29+
token: ${{ secrets.CREATE_PR_ACTION_TOKEN }}
30+
commit-message: 🍱 Update the backup file with the Gitmoji API
31+
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
32+
branch: sync-backup-file-with-api
33+
branch-suffix: short-commit-hash
34+
title: 🍱 Update the backup file with the Gitmoji API
35+
body: |
36+
## Description
37+
38+
The backup file has been updated to represent the current state of the official Gitmoji API. πŸŽ‰
39+
40+
ℹ️ Automated changes by [Create Pull Request](https://github.com/peter-evans/create-pull-request) action by Peter Evans.
41+
assignees: paduszyk
42+
labels: chores

0 commit comments

Comments
Β (0)