🤖 Dependencies Update #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🤖 Dependencies Update | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
Gum: | |
runs-on: Ubuntu-Latest | |
steps: | |
- name: 🚚 Checkout Repository | |
uses: actions/checkout@v4 | |
- name: 🎀 Get the Latest Gum Version | |
id: gum | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
tag="$(gh release list --repo='charmbracelet/gum' --limit=1 --json='name' --jq='.[].name')" | |
echo "version=${tag:1}" | tee -a "$GITHUB_OUTPUT" | |
- name: 📋 Find and Replace the Gum Version | |
id: find-replace | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "[0-9]+.[0-9]+.[0-9]+" | |
replace: ${{ steps.gum.outputs.version }} | |
include: "setup" | |
- name: ⬆️ Commit & Push Changes | |
if: ${{ steps.find-replace.outputs.modifiedFiles > 0 }} | |
uses: actions-js/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
message: | | |
chore(setup): Version up Gum version | |
Change Gum version to v${{ steps.gum.outputs.version }}. | |
pre-commit: | |
runs-on: Ubuntu-Latest | |
steps: | |
- name: 🚚 Checkout Repository | |
uses: actions/checkout@v4 | |
- name: 🚸 Install pre-commit | |
run: pip install pre-commit | |
- name: 🚸 Auto-update pre-commit.yml | |
run: pre-commit autoupdate -c='data/pre-commit.yml' | |
- name: 🔍 Check the Changes | |
id: changes | |
run: echo "changes=$(git status --porcelain)" | tee -a "$GITHUB_OUTPUT" | |
- name: ⬆️ Commit & Push Changes | |
if: ${{ steps.changes.outputs.changes != '' }} | |
uses: actions-js/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
message: | | |
chore(pre-commit): Update pre-commit tools | |
To use the latest feature of pre-commit. |