Skip to content

ci: add GitHub Actions workflow to automatically update README.md on … #1

ci: add GitHub Actions workflow to automatically update README.md on …

ci: add GitHub Actions workflow to automatically update README.md on … #1

Workflow file for this run

name: Update README.md on push to main

Check failure on line 1 in .github/workflows/readme.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/readme.yaml

Invalid workflow file

(Line: 12, Col: 17): Expected format {org}/{repo}[/path]@ref. Actual 'actions/checkout', (Line: 14, Col: 17): Expected format {org}/{repo}[/path]@ref. Actual 'dart-lang/setup-dart', (Line: 28, Col: 17): Expected format {org}/{repo}[/path]@ref. Actual 'ad-m/github-push-action'
on:
push:
branches:
- main
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout
- name: Set up Dart
uses: dart-lang/setup-dart
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Generate README
run: dart run tool/generate_readme.dart
- 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 diff --cached --quiet || git commit -m 'docs(readme): update README.md [skip ci]'
- name: Push changes
uses: ad-m/github-push-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}