feat: 更新组件 #115
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: GitHub CI | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 20 * * 0 | |
jobs: | |
generate-jobs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check for changes | |
run: | | |
apps=("golang" "node" "python") | |
commit_message="build(app): bump app to latest" | |
for app in "${apps[@]}"; do | |
pushd $app | |
chmod +x *.sh | |
./update.sh | |
popd | |
done | |
git status | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git commit -am "${commit_message}" || exit 0 | |
git push origin HEAD:main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |