bootstrap-icons #2602
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: bootstrap-icons | |
on: | |
push: | |
paths: | |
- assets/bootstrap-icons.json | |
- .github/workflows/bootstrap-icons.yml | |
schedule: | |
- cron: "0 */6 * * *" | |
workflow_dispatch: | |
jobs: | |
bootstrap-icons: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: update bootstrap-icons | |
run: | | |
cd assets | |
curl -sL $(curl -sL https://api.github.com/repos/twbs/icons/releases/latest --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" | jq -r .assets[].browser_download_url) -o bootstrap-icons.zip | |
unzip bootstrap-icons.zip | |
rm -rf bootstrap-icons bootstrap-icons.zip | |
mv bootstrap-icons-* tmp | |
mkdir bootstrap-icons | |
for icon in $(jq -r .[] bootstrap-icons.json); do mv tmp/"$icon".svg bootstrap-icons/"$icon".svg; done | |
- name: push changes | |
run: | | |
git add assets/bootstrap-icons | |
git config user.name "GitHub" | |
git config user.email "[email protected]" | |
git diff-index --quiet HEAD || git commit -sm "bootstrap-icons" | |
git push |