From b5d4d3c624588f50cc830417b4db90764886b43c Mon Sep 17 00:00:00 2001 From: Altan Orhon Date: Tue, 24 Oct 2023 18:32:14 -0700 Subject: [PATCH] Build installer --- .github/workflows/mkinstaller.yml | 35 ++++++++++--------------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/.github/workflows/mkinstaller.yml b/.github/workflows/mkinstaller.yml index 7435945..5e880f1 100644 --- a/.github/workflows/mkinstaller.yml +++ b/.github/workflows/mkinstaller.yml @@ -8,30 +8,17 @@ jobs: name: Build install.sh permissions: write-all steps: - - name: Install jinja-cli + - name: Template, create, and push install.sh run: | - python3 -m pip install jinja-cli - - name: Check out code for the container build - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Check if install.j2.sh has changed - id: installer-changed - run: | - if git --no-pager diff --name-only --quiet --diff-filter=AM ${{ github.event.before }} ${{ github.event.after }} -- .build/install.j2.sh .github/workflows/mkinstaller.yml; then - gh run cancel ${{ github.run_id }} - gh run watch ${{ github.run_id }} + if ! git --no-pager diff --name-only --quiet --diff-filter=AM ${{ github.event.before }} ${{ github.event.after }} -- .build/install.j2.sh .github/workflows/mkinstaller.yml; then + python3 -m pip install jinja-cli + pushd .build/ + jinja -D j2_hyakvnc_repo_url 'https://github.com/${{ github.repository }}' install.sh.j2 > ../install.sh + popd + git config --local user.email "${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com" + git config --local user.name ${{ github.event.sender.login }} + git add install.sh + git commit -am "Update install.sh" + git push fi - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create and push install.sh - run: | - pushd .build/ - jinja -D j2_hyakvnc_repo_url 'https://github.com/${{ github.repository }}' install.sh.j2 > ../install.sh - popd - git config --local user.email "${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com" - git config --local user.name ${{ github.event.sender.login }} - git add install.sh - git commit -am "Update install.sh" - git push