Generate Markdown for Starred Github Repository. #28872
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 Markdown for Starred Github Repository." | |
on: | |
schedule: | |
- cron: "0 */2 * * *" | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Generate Markdown File. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5.0.2 | |
with: | |
go-version: '1.17.1' | |
- name: Print Go Version | |
run: go version | |
- name: Run github-star CLI | |
run: go run main.go generate -t ${{ secrets.GH_TOKEN }} -f README.md | |
- name: Run git diff | |
run: git diff README.md | |
- name: Push New File | |
run: echo -e `git config --global user.name 'github-ci' && git config --global user.email 'github-ci@users.noreply.github.com' && git add README.md && git commit -am "README.md file updated with latest starred repo's" && git push` | |