when testing downstream use the correct release branch (#2265)

* when testing downstream use the correct release branch

additionally, we re-merge upstream in case new changes appear in HEAD

* pr feedback
This commit is contained in:
Dave Protasowski 2021-09-09 12:27:59 -04:00 committed by GitHub
parent bfab3c8fc5
commit fb7ee28566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 3 deletions

View File

@ -82,19 +82,34 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Install Dependencies
run: |
go get github.com/google/go-licenses
- name: Checkout Upstream
- name: Checkout upstream at ${{ github.base_ref }}
uses: actions/checkout@v2
with:
fetch-depth: 0
path: ./src/knative.dev/${{ github.event.repository.name }}
- name: Checkout Downstream
- name: Merge upstream
if: github.event_name == 'pull_request'
shell: bash
working-directory: ./src/knative.dev/${{ github.event.repository.name }}
run: |
git remote add upstream https://github.com/${{ github.repository }}.git
git fetch upstream ${{ github.base_ref }}
git pull --no-rebase --no-commit upstream ${{ github.base_ref }}
- name: Checkout downstream at ${{ github.base_ref }}
uses: actions/checkout@v2
with:
ref: ${{ github.base_ref }}
repository: ${{ matrix.org }}/${{ matrix.repo }}
path: ./src/knative.dev/${{ matrix.repo }}
- name: Test Downstream
- name: Test downstream
uses: knative-sandbox/actions-downstream-test@v1
with:
upstream-module: knative.dev/${{ github.event.repository.name }}