From: Jérôme Benoit Date: Sat, 22 Oct 2022 11:03:36 +0000 (+0200) Subject: Use github event in more github actions X-Git-Tag: v2.3.6~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=12257749724afce52b5e384001deb77a4dd24a59;p=poolifier.git Use github event in more github actions Signed-off-by: Jérôme Benoit --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ee63b19..cdeb9183 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - master + - ${{ github.event.repository.default_branch }} pull_request: types: [opened, synchronize, reopened] workflow_dispatch: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3e61d69e..719e5743 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,12 @@ name: 'CodeQL' on: push: - branches: [master] + branches: + - ${{ github.event.repository.default_branch }} pull_request: # The branches below must be a subset of the branches above - branches: [master] + branches: + - ${{ github.event.repository.default_branch }} schedule: - cron: '44 9 * * 3' diff --git a/.github/workflows/generate-typedoc.yml b/.github/workflows/generate-typedoc.yml index 93d5c23b..f69969a1 100644 --- a/.github/workflows/generate-typedoc.yml +++ b/.github/workflows/generate-typedoc.yml @@ -25,14 +25,14 @@ jobs: npm run typedoc - name: Commit files - if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/master'" + if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'" run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git commit -m "Generate TypeDoc" -a - name: Push changes - if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/master'" + if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'" uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }}