From d6f65649a1e83336b5d53ac6f4c72513471eb2ce Mon Sep 17 00:00:00 2001 From: Neilpang Date: Sun, 10 Dec 2023 15:45:13 +0000 Subject: [PATCH] Sync from base-builder --- .github/workflows/generate.yml | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/generate.yml diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 0000000..c44d1d3 --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,56 @@ +name: "Step 2, Generate the project from Base builder" +on: + schedule: + - cron: '10 1 * * *' + workflow_dispatch: + push: + branches: + - 'main' + paths: + - 'conf/*' + - '.github/data/*' + - '.github/workflows/generate.yml' + + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.VM_TOKEN }} + fetch-depth: '2' + + - name: Preparing env variables + run: | + git switch main || (git fetch --all && git checkout -b main origin/main) + . conf/all.release.conf + echo "ALL_RELEASES=$ALL_RELEASES" >> $GITHUB_ENV + git clone https://github.com/vmactions/base-builder.git + mkdir -p .github/tpl + cat base-builder/.github/tpl/README.tpl.md >.github/tpl/README.tpl.md + + - name: Generate files + uses: vmactions/render@v0.0.1 + with: + datafile: .github/data/datafile.ini + files: | + base-builder/.github/tpl/build.tpl.yml : .github/workflows/build.yml + base-builder/.github/tpl/manual.tpl.yml : .github/workflows/manual.yml + base-builder/.github/FUNDING.yml : .github/FUNDING.yml + base-builder/.github/workflows/readme.yml : .github/workflows/readme.yml + base-builder/build.sh : build.sh + + - uses: EndBug/add-and-commit@v9 + with: + message: "Update from base builder" + pull: '--rebase --autostash ' + add: | + .github/workflows/readme.yml + .github/workflows/manual.yml + .github/workflows/build.yml + .github/tpl/README.tpl.md + .github/FUNDING.yml + build.sh + +