Skip to content

Commit

Permalink
Test rebuild trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
goodov committed Aug 30, 2024
1 parent 36288c9 commit 46224dd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/generate-test-seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: Generate Test Seed

on:
pull_request:
types: [opened, synchronize, reopened, labeled]
paths:
- 'seed/seed.json'
- 'studies/**'

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 }}'
BASE_SHA: '${{ github.event.pull_request.base.sha }}'
Expand All @@ -17,11 +20,23 @@ jobs:
SEED_VERSION: 'pull/${{ github.event.pull_request.number }}@${{ github.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

- name: Fetch base commit
run: git fetch --depth=1 origin "$BASE_SHA"

- name: Rebase on base branch
run: |

Check failure on line 33 in .github/workflows/generate-test-seed.yml

View workflow job for this annotation

GitHub Actions / build

shellcheck reported issue in this script: SC2143:style:2:61: Use ! grep -q instead of comparing output with

Check failure on line 33 in .github/workflows/generate-test-seed.yml

View workflow job for this annotation

GitHub Actions / build

shellcheck reported issue in this script: SC2143:style:2:61: Use ! grep -q instead of comparing output with
echo "${{ contains(github.event.pull_request.labels.*.name, 'CI/no-rebase') }}"
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:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ 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'
env:
BASE_SHA: '${{ github.event.pull_request.base.sha || github.event.merge_group.base_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

- name: fetch base commit
Expand Down
2 changes: 1 addition & 1 deletion seed/seed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2958,5 +2958,5 @@
"name": "NewiOSPlaylistUIStudy"
}
],
"version": "1"
"version": "2"
}

0 comments on commit 46224dd

Please sign in to comment.