test_2 #9
Workflow file for this run
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 test Version | |
on: | |
release: | |
types: | |
- released | |
permissions: | |
contents: read | |
jobs: | |
update-shield: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout código | |
uses: actions/checkout@v2 | |
- name: Actualizar escudo de versión | |
run: | | |
version=$(awk -F"'" '/\$number_version/{print $2}' test_vers.php) | |
echo "![Version](https://img.shields.io/badge/Version-$version-blue)" > README-shield.md | |
- name: Actualizar README.md | |
run: | | |
mv README-shield.md README.md | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
# Asegúrate de usar el nombre correcto de tu rama principal | |
git checkout main # O el nombre correcto de tu rama principal | |
# Intenta hacer un pull solo si hay cambios en la rama principal | |
git pull origin main || true | |
git add README.md | |
git commit -am "Actualizar escudo de versión [skip ci]" | |
git push origin main # O el nombre correcto de tu rama principal |