From e66bead30a69649d77fed6e5addaaebee06aa497 Mon Sep 17 00:00:00 2001 From: kumy Date: Tue, 26 Dec 2023 09:47:45 +0100 Subject: [PATCH] ci: Prevent PR WF to run twice (#885) * ci: Prevent PR WF to run twice * ci: new test --- .github/workflows/automatic-rebase.yml | 2 +- .github/workflows/docker-build.yml | 2 +- .github/workflows/pr-rebase.yml | 2 +- .github/workflows/robot-framework.yml | 8 +++++--- .github/workflows/sentry-release.yml | 2 +- .github/workflows/translations.yml | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/automatic-rebase.yml b/.github/workflows/automatic-rebase.yml index e1ff12fb50..7404d3d6b0 100644 --- a/.github/workflows/automatic-rebase.yml +++ b/.github/workflows/automatic-rebase.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout the latest code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: feature/new-theme token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index fd1d6c178d..f7b464cbfe 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -18,7 +18,7 @@ jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/pr-rebase.yml b/.github/workflows/pr-rebase.yml index f8513db228..e762ce521b 100644 --- a/.github/workflows/pr-rebase.yml +++ b/.github/workflows/pr-rebase.yml @@ -16,7 +16,7 @@ jobs: ) steps: - name: Checkout the latest code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.GH_TOKEN }} fetch-depth: 0 # otherwise, you will fail to push refs to dest repo diff --git a/.github/workflows/robot-framework.yml b/.github/workflows/robot-framework.yml index f3b66b9bad..7498408752 100644 --- a/.github/workflows/robot-framework.yml +++ b/.github/workflows/robot-framework.yml @@ -1,12 +1,14 @@ name: Integration tests on Robot Framework on: - pull_request: + pull_request_target: branches-ignore: - master - l10n_main - l10n_master - l10n_new-theme + types: + - closed push: branches-ignore: - master @@ -25,11 +27,11 @@ env: jobs: robot-framework: - if: "${{ !contains(github.event.head_commit.message, 'skip translate') && !contains(github.event.head_commit.message, 'skip test-qa') }}" + if: "${{ (github.event_name == 'push' || github.event.pull_request.merged == true) && !contains(github.event.head_commit.message, 'skip tests-qa') }}" runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set output id: vars diff --git a/.github/workflows/sentry-release.yml b/.github/workflows/sentry-release.yml index 676717bc1b..0a1658f4de 100644 --- a/.github/workflows/sentry-release.yml +++ b/.github/workflows/sentry-release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create Sentry release uses: getsentry/action-release@v1 diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 0cc09c61c1..39458ccfb1 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set output id: vars