Revert "meta: profiles: add test profile" #3
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 README on PR Merge | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true # This will initialize and update submodules | |
- name: Set up Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y tree sed | |
- name: Run generate_readme.sh script | |
run: bash meta/scripts/generate_readme.sh > README.md | |
- name: Commit and push changes if README.md is updated | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
if [ -n "$(git status --porcelain README.md)" ]; then | |
git add README.md | |
git commit -m 'Update README on PR merge' | |
git push origin master | |
else | |
echo "No changes to README.md" | |
fi |