feat(day16): Enhance Metabase auto-setup with API key authentication … #40
This file contains hidden or 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: Auto-Update README | |
| # This workflow automatically updates README.md when code is pushed | |
| # Computing effort: Runs in ~10 seconds on GitHub's free tier | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'day*/**' # Only trigger when day folders change | |
| - '!README.md' # Don't trigger on README changes (avoid loops) | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Update README | |
| run: | | |
| python common/utils/update_readme.py --verbose | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| if git diff --quiet README.md; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push if changed | |
| if: steps.check_changes.outputs.changed == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add README.md | |
| git commit -m "Auto-update README.md with latest project status" | |
| git push | |
| - name: Summary | |
| run: | | |
| if [ "${{ steps.check_changes.outputs.changed }}" == "true" ]; then | |
| echo "✅ README.md was updated and pushed" | |
| else | |
| echo "✅ README.md is already up to date" | |
| fi |