ci: fix typo #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 Badge | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-badge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Read value from file | |
id: read-value | |
run: | | |
VALUE=$(cat gym/lifts.txt) | |
echo "::set-output name=value::$VALUE" | |
- name: Update README.md with the new badge value | |
run: | | |
VALUE=${{ steps.read-value.outputs.value }} | |
sed -i "s/git_lifts-[^)]*/git_lifts-${VALUE}-blue/" README.md | |
- name: Commit changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add README.md | |
git commit -m "docs(ci): update git lift badge value to ${VALUE}" | |
- name: Push changes | |
env: | |
PAT_TOKEN: ${{ secrets.ACTIONS_PAT }} | |
run: | | |
git remote set-url origin https://x-access-token:${PAT_TOKEN}@github.com/${{ github.repository }} | |
git push |