Update ghfetch gif with vhs #7
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: Update ghfetch gif with vhs | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */6 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- name: Install latest ttyd | |
run: | | |
wget https://github.com/tsl0922/ttyd/releases/download/1.7.4/ttyd.x86_64 | |
chmod +x ttyd.x86_64 | |
sudo mv ttyd.x86_64 /usr/local/bin/ttyd | |
ttyd --version | |
- name: Install ffmpeg | |
run: | | |
sudo apt update | |
sudo apt install -y ffmpeg | |
- name: Install vhs and ghfetch | |
run: | | |
go install github.com/orangekame3/[email protected] | |
- name: Run ghfetch | |
uses: charmbracelet/vhs-action@v1 | |
with: | |
path: 'img/demo.tape' | |
- name: export GITHUB_TOKEN | |
run: | | |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
- name: Convert to gif | |
go install github.com/orangekame3/[email protected] | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
commit_message: Update generated VHS GIF | |
branch: main | |
commit_user_name: vhs-action 📼 | |
commit_user_email: [email protected] | |
commit_author: vhs-action 📼 <[email protected]> | |
file_pattern: 'img/*.gif' |