From a6ec1bae3b7517294c04775e550b860acbb4e3a1 Mon Sep 17 00:00:00 2001 From: Aleksey Khoroshilov Date: Thu, 25 Jul 2024 18:48:29 +0700 Subject: [PATCH] Test rebuild trigger --- .github/workflows/generate-test-seed.yml | 15 +++++++++++++++ .github/workflows/test-src.yml | 7 +++++++ seed/seed.json | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-test-seed.yml b/.github/workflows/generate-test-seed.yml index 3afacec5..361c3bfc 100644 --- a/.github/workflows/generate-test-seed.yml +++ b/.github/workflows/generate-test-seed.yml @@ -2,6 +2,7 @@ name: Generate Test Seed on: pull_request: + types: [opened, synchronize, reopened, labeled] paths: - 'seed/seed.json' - 'studies/**' @@ -9,16 +10,30 @@ on: jobs: build: runs-on: ubuntu-latest + if: github.event.action != 'labeled' || github.event.label.name == 'CI/rebuild' + env: ACTION_RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' REMOTE_SEED_PATH: 'pull/${{ github.event.pull_request.number }}/seed' SEED_VERSION: 'pull/${{ github.event.pull_request.number }}@${{ github.event.pull_request.head.sha }}' steps: + - name: Remove CI/rebuild label + if: github.event.action == 'labeled' && github.event.label.name == 'CI/rebuild' + run: gh pr edit ${{ github.event.pull_request.number }} --remove-label 'CI/rebuild' + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 with: fetch-depth: 0 + - name: Rebase on base branch + run: | + echo "${{ github.event.pull_request.labels }}" + if [[ -z "${{ github.event.pull_request.labels }}" ]] || [[ -z "$(echo "${{ github.event.pull_request.labels }}" | grep 'CI/no-rebase')" ]]; then + git fetch origin "${{ github.event.pull_request.base.sha }}" + git rebase FETCH_HEAD + fi + - name: Setup Python uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5 with: diff --git a/.github/workflows/test-src.yml b/.github/workflows/test-src.yml index 0d296512..13c4997d 100644 --- a/.github/workflows/test-src.yml +++ b/.github/workflows/test-src.yml @@ -2,12 +2,19 @@ name: Tracker&Griffin tests on: pull_request: + types: [opened, synchronize, reopened, labeled] merge_group: jobs: build: runs-on: ubuntu-latest + if: github.event.action != 'labeled' || github.event.label.name == 'CI/rebuild' + steps: + - name: Remove CI/rebuild label + if: github.event.action == 'labeled' && github.event.label.name == 'CI/rebuild' + run: gh pr edit ${{ github.event.pull_request.number }} --remove-label 'CI/rebuild' + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 with: fetch-depth: 0 diff --git a/seed/seed.json b/seed/seed.json index 003b7a19..918b2a72 100644 --- a/seed/seed.json +++ b/seed/seed.json @@ -2999,5 +2999,5 @@ "name": "BraveP3ANebulaRelease" } ], - "version": "1" + "version": "2" }