diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62c193c1..9e34ed90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,12 +63,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static - - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - uses: actions/checkout@v4 with: repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -81,6 +75,12 @@ jobs: restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 - uses: actions/setup-java@v3 with: java-version: '17' diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 58e11e1d..bbe033d3 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -75,14 +75,9 @@ jobs: steps: - uses: actions/checkout@v4 with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - uses: actions/cache@v3 with: path: ~/.m2 @@ -90,6 +85,16 @@ jobs: restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' - name: maven-settings uses: s4u/maven-settings-action@v2 with: