Skip to content

Commit

Permalink
fix build docker arch
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAfCod committed Aug 12, 2024
1 parent 45ac603 commit f168da1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/container-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ jobs:
strategy:
matrix:
combination:
- tag: ${{ inputs.version }}
platform: ''
runner: ubuntu-latest
# - tag: ${{ inputs.version }}
# platform: ''
# runner: ubuntu-latest
- tag: ${{ inputs.version }}-amd64
platform: 'linux/amd64'
runner: ubuntu-latest
- tag: ${{ inputs.version }}-arm64
platform: 'linux/arm64'
runner: ubuntu-latest
- tag: latest
platform: ''
runner: ubuntu-latest
Expand All @@ -41,7 +44,7 @@ jobs:
run: |
PLATFORM_OPT=""
[[ x${{ matrix.combination.platform }} != 'x' ]] && PLATFORM_OPT="--platform ${{ matrix.combination.platform }}"
docker run -d $PLATFORM_OPT --name ${{ env.CONTAINER_NAME }} optimism-java/op-besu:${{ matrix.combination.tag }}
docker run -d $PLATFORM_OPT --name ${{ env.CONTAINER_NAME }} ghcr.io/optimism-java/op-besu:${{ matrix.combination.tag }}
- name: Verify besu container
run: bash .github/workflows/BesuContainerVerify.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ jobs:
- name: publish
env:
architecture: ${{ steps.prep.outputs.ARCH }}
run: ./gradlew --no-daemon dockerUpload -PdockerArtifactName=${{ env.registry }}/${{ github.repository }} -Pversion=${{github.event.release.name}} -Prelease.releaseVersion=${{ github.event.release.name }}
run: ./gradlew --no-daemon dockerUpload -Pdocker-platform=linux/${{ steps.prep.outputs.ARCH }} -PdockerArtifactName=${{ env.registry }}/${{ github.repository }} -Pversion=${{github.event.release.name}} -Prelease.releaseVersion=${{ github.event.release.name }}

multiArch:
needs: [ buildAmd64Docker, buildArm64Docker ]
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ task distDocker {
def gitDetails = getGitCommitDetails(7)
executable shell
workingDir dockerBuildDir
args "-c", "docker build ${dockerPlatform} --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${gitDetails.hash} -t ${image} ."
args "-c", "docker buildx build ${dockerPlatform} --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${gitDetails.hash} -t ${image} ."
}
}
}
Expand Down

0 comments on commit f168da1

Please sign in to comment.