From 0306a2d8c85eabdb419b871a583a5cf88527ea02 Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Wed, 21 Jun 2023 22:17:17 +0200 Subject: [PATCH] ci: commit --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91f14a03..b2631eca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,6 @@ name: Tipi CI on: + push: pull_request: types: [opened, synchronize, reopened, ready_for_review] @@ -17,7 +18,7 @@ jobs: update-config: needs: get-last-commit-message - if: github.event_name == 'pull_request' && contains(${{ needs.get-last-commit-message.outputs.last_commit_message }}, '[ready]') == false && contains(github.ref_name, 'renovate') + if: github.event_name == 'pull_request' && !contains(${{ needs.get-last-commit-message.outputs.last_commit_message }}, '[ready]') && contains(github.ref_name, 'renovate') runs-on: ubuntu-latest steps: - name: Checkout @@ -28,7 +29,7 @@ jobs: - name: Get list of updated files by the last commit in this branch separated by space id: updated-files run: | - echo "files=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | tr '\n' ' ')" >> $GITHUB_OUTPUT + echo "files=$(git diff-tree --no-commit-id --name-only -r $(git rev-parse HEAD) | tr '\n' ' ')" >> $GITHUB_OUTPUT - name: Run renovate-app-version.sh on updated files run: | @@ -41,8 +42,14 @@ jobs: fi done + - name: Commit and push changes + run: | + git config --local user.email "github-actions@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add apps/*/config.json && git commit -m "Update app version [ready]" --no-verify && git push || echo "No changes to commit" + ci: - needs: get-last-commit-message + needs: update-config runs-on: ubuntu-latest steps: - name: Checkout