Skip to content

Commit

Permalink
fix(CI): fix workflow bug (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg committed Nov 28, 2023
1 parent fa6436f commit 59c2212
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/ci-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ jobs:

build-image:
runs-on: ubuntu-latest
permissions:
pull-requests: write
needs: [get-pom-properties]
steps:
- name: Install qemu
Expand All @@ -56,24 +54,25 @@ jobs:
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-
${{ runner.os }}-
- name: maven-settings
uses: s4u/maven-settings-action@v2
with:
githubServer: false
- uses: skjolber/maven-cache-github-action@v1
with:
step: restore
githubServer: true
- run: git submodule init
- run: git submodule update
- run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package
env:
GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save cryostat image
run: podman save -o cryostat-${{ inputs.build-arch }}.tar --format oci-archive quay.io/cryostat/cryostat
- uses: actions/upload-artifact@v3
with:
name: cryostat-${{ inputs.build-arch }}
path: /home/runner/work/cryostat/cryostat/cryostat-${{ inputs.build-arch }}.tar
- uses: skjolber/maven-cache-github-action@v1
with:
step: save
4 changes: 2 additions & 2 deletions .github/workflows/ci-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
- name: maven-settings
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]'
servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN}"}]'
githubServer: false
- name: Run spotbugs
run: mvn -B -U -Dheadless=true compile spotbugs:check
env:
GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

shellcheck:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/integrated-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ jobs:
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-
${{ runner.os }}-
- name: maven-settings
uses: s4u/maven-settings-action@v2
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ jobs:
strategy:
matrix:
arch: [amd64, arm64]
permissions:
pull-requests: write
uses: ./.github/workflows/ci-build-image.yml
with:
build-arch: ${{ matrix.arch }}
Expand Down

0 comments on commit 59c2212

Please sign in to comment.