diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6238f731..9e34ed90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,22 +65,26 @@ jobs: sudo apt-get install -y qemu-user-static - 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 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} restore-keys: | - ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} ${{ 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: diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 1878a3d5..bbe033d3 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -75,22 +75,26 @@ 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 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} restore-keys: | - ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} ${{ 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: