From 20e41e41c4bbcbc1d811c265684deeb41c865397 Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Wed, 6 Dec 2023 14:21:44 +0100 Subject: [PATCH] Updated workflows from master --- .github/workflows/checks.yml | 2 ++ .github/workflows/submodules_update.yml | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7c8d99c..6ff75ea 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -3,12 +3,14 @@ name: checks on: + workflow_call: push: branches: - master # using filter pattern: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet - '[cC][0-9][0-9][0-9]-+**' # c123 or c123-something for custom branch - '[0-9][0-9][0-9][0-9].[0-9][0-9].xx' # stable brances. E.g. 2021.01.xx + - 'push-action/**' pull_request: branches: - master diff --git a/.github/workflows/submodules_update.yml b/.github/workflows/submodules_update.yml index d5d7592..07b82c6 100644 --- a/.github/workflows/submodules_update.yml +++ b/.github/workflows/submodules_update.yml @@ -1,9 +1,9 @@ name: Update Submodules on: - schedule: + # schedule: # run daily at midnight - - cron: '0 0 * * *' + # - cron: '0 0 * * *' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -30,4 +30,8 @@ jobs: git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions - update submodules" git commit -am "Update submodules" || echo "No changes to commit" - git push + - name: Push to protected branch + uses: CasperWA/push-protected@v2 + with: + token: ${{ secrets.PUSH_PROTECTED_BRANCH_TOKEN }} # This requires a special token to be able to trigger checks on new branch creation + ref: ${{ github.ref }}