Skip to content

Generate fluttercandies profile/README.md #7604

Generate fluttercandies profile/README.md

Generate fluttercandies profile/README.md #7604

name: "Generate fluttercandies profile/README.md"
on:
schedule:
# Runs every 4 hours
- cron: "0 0/4 * * *"
workflow_dispatch:
env:
ORG: fluttercandies
TARGET_FILE: /tmp/.github/profile/README.md
jobs:
make_org_repo_list:
runs-on: ubuntu-latest
name: Generate FlutterCandies .github/profile/README.md
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: caijinglong/action-org-repo-list@v1
id: org_repo_list
with:
github-token: ${{ secrets.PERSON_TOKEN }}
org: ${{ env.ORG }}
exclude-repo-names: ".github,.github-workflow"
wrap-with-details: true
- name: Make table.md
run: |
echo "${{ steps.org_repo_list.outputs.table }}" >> /tmp/TABLE.md
- name: Generate README.md
env:
GH_TOKEN: ${{ github.token }}
run: |
gh repo clone ${{ env.ORG }}/.github /tmp/.github
cd /tmp/.github
if [ ! -d "profile" ]; then
mkdir profile
fi
if [ -f "$TARGET_FILE" ]; then
rm $TARGET_FILE
fi
touch $TARGET_FILE
- name: run python script
run: |
python3 make-profile-readme.py
- name: Push changes
env:
GH_TOKEN: ${{ secrets.PERSON_TOKEN }}
run: |
cd /tmp/.github
echo "Generated by [workflow](https://github.com/fluttercandies/.github-workflow/blob/main/.github/workflows/update-fluttercandies-profile-readme.yml) at $(date -Iseconds) " >> $TARGET_FILE
echo "${{github.workflow}}"
echo "" >> $TARGET_FILE
gh auth setup-git -h github.com
git config --global user.email "[email protected]"
git config --global user.name "fluttercandies-dev"
git add .
git commit -m "Update profile/README.md from CI"
git push
pub_dashboard_job:
needs: make_org_repo_list
runs-on: ubuntu-latest
name: pub-dashboard FlutterCandies .github/profile/README.md
steps:
- name: run pub-dashboard
uses: AmosHuKe/pub-dashboard@main
with:
github_token: ${{ secrets.PERSON_TOKEN }}
github_repo: "https://github.com/fluttercandies/.github"
filename: "profile/README.md"
publisher_list: "fluttercandies.com"
package_list: "flutter_tilt,scrollview_observer,dext,flutter_custom_calendar,draggable_container,flutter_filereader,flutter_image_compress,flutter_live_activities,harmony_os_version,nav_router,saver_gallery,upgrade_tool,w_popup_menu,w_reorder_list"
sort_field: "published"
sort_mode: "asc"
committer_username: "fluttercandies-dev"
committer_email: "[email protected]"
commit_message: "Update profile/README.md from CI - pub_dashboard_job"