Step 1, Sync generate.yml from BaseVM #1111
This file contains hidden or 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: "Step 1, Sync generate.yml from BaseVM" | |
| on: | |
| schedule: | |
| - cron: '0 1 * * *' | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - '.github/data/*' | |
| - 'conf/*' | |
| - '.github/workflows/syncbase.yml' | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.VM_TOKEN }} | |
| - name: Get latest release | |
| id: get-latest-release | |
| uses: InsonusK/get-latest-release@v1.1.0 | |
| with: | |
| myToken: ${{ github.token }} | |
| view_top: 1 | |
| - name: Using main branch | |
| run: | | |
| git switch main || (git fetch --all && git checkout -b main origin/main) | |
| . conf/default.release.conf | |
| echo "DEFAULT_RELEASE=$DEFAULT_RELEASE" >> $GITHUB_ENV | |
| echo "ALL_RELEASES=\"$(ls conf/ | grep -v default | sed 's/.conf//g' | tr '\n' ',' | sed "s/,\$//" | sed 's/,/", "/g')\"" >> $GITHUB_ENV | |
| git clone https://github.com/vmactions/base-vm.git | |
| - name: Sync generate.yml | |
| uses: vmactions/render@v0.0.1 | |
| env: | |
| LATEST_TAG: ${{ steps.get-latest-release.outputs.tag_name }} | |
| with: | |
| datafile: .github/data/datafile.ini | |
| files: | | |
| base-vm/.github/tpl/generate.tpl.yml : .github/workflows/generate.yml | |
| - uses: EndBug/add-and-commit@v9 | |
| with: | |
| message: "Sync from https://github.com/vmactions/base-vm" | |
| pull: '--rebase --autostash ' | |
| add: | | |
| .github/workflows/generate.yml | |