Wrote Resultados and Intro.desafios #9
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: Generate README | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
jobs: | |
merge_markdown: | |
runs-on: ubuntu-latest | |
env: | |
README1: other_resources/baseReadme.md | |
README2: library/README.md | |
OUTPUT: README.md | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Merge files | |
run: | | |
cat $README1 $README2 > $OUTPUT | |
if ! git diff --exit-code $OUTPUT; then | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add $OUTPUT | |
git commit -m "Autogenerated $OUTPUT" | |
git push https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} HEAD | |
else | |
echo "No changes detected in $OUTPUT, skipping commit." | |
fi |