Update README #20785
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: Update README | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'scripts/ReadMeTemplate.java' | |
workflow_dispatch: | |
schedule: | |
- cron: '15 * * * *' | |
jobs: | |
generate-readme: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Generate README | |
run: ./scripts/run-script.sh ReadMeTemplate | |
- name: Commit changes | |
if: ${{ env.COMMIT_CHANGE == 'true' }} | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add -A | |
git commit -m "[BOT] Update README.md" | |
- name: Publish changes | |
if: ${{ env.COMMIT_CHANGE == 'true' }} | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Sync to Gitee | |
if: ${{ env.COMMIT_CHANGE == 'true' }} | |
run: | | |
mkdir -p ~/gitee/.ssh | |
echo "$INPUT_SSH_PRIVATE_KEY" > ~/gitee/.ssh/id_rsa | |
chmod 600 ~/gitee/.ssh/id_rsa | |
export GIT_SSH_COMMAND="ssh -v -i ~/gitee/.ssh/id_rsa -o StrictHostKeyChecking=no -F /dev/null" | |
git push --mirror "$INPUT_TARGET_REPO_URL" | |
env: | |
INPUT_SSH_PRIVATE_KEY: | |
${{ secrets.GITEE_SYNC_BOT_PRIVATE_KEY }} | |
INPUT_TARGET_REPO_URL: | |
[email protected]:Glavo/HMCL-Update.git |