diff --git a/.github/workflows/sync-api-backup.yml b/.github/workflows/sync-api-backup.yml new file mode 100644 index 0000000..89abb0e --- /dev/null +++ b/.github/workflows/sync-api-backup.yml @@ -0,0 +1,42 @@ +name: Sync the backup with the API + +on: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +jobs: + sync: + name: Sync and create PR + runs-on: ubuntu-latest + steps: + - name: Check out 🎉 + uses: actions/checkout@v4.1.1 + - name: Set up Python 🐍 + uses: actions/setup-python@v4.7.1 + with: + cache: pip + - name: Install the package đŸ“Ļ + run: | + python -m pip install --upgrade pip + python -m pip install -e . + - name: Run the `sync` command 🚀 + run: + gitmojis sync + - name: Create pull request 🎉 + uses: peter-evans/create-pull-request@v5.0.2 + with: + token: ${{ secrets.CREATE_PR_ACTION_TOKEN }} + commit-message: 🍱 Update the backup file with the Gitmoji API data + author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> + branch: sync-backup-file-with-api + branch-suffix: short-commit-hash + title: 🍱 Update the backup file with the Gitmoji API data + body: | + ## Description + + The backup file has been updated to represent the current state of the official Gitmoji API. 🎉 + + â„šī¸ Automated changes by [Create Pull Request](https://github.com/peter-evans/create-pull-request) action by Peter Evans. + assignees: paduszyk + labels: chores