Skip to content

Commit

Permalink
Workaround for buildx build failures (#236)
Browse files Browse the repository at this point in the history
Until quarkusio/quarkus#30424 is fixed

Signed-off-by: nscuro <nscuro@protonmail.com>

Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Jan 17, 2023
1 parent 9b7c088 commit a96a7fe
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
53 changes: 45 additions & 8 deletions .github/workflows/publishJar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,49 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
- name: Determine project version
id: determine-project-version
run: |-
mvn clean install -DskipTests \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.registry=ghcr.io \
-Dquarkus.container-image.group=${{ github.repository_owner }} \
-Dquarkus.container-image.additional-tags=latest \
-Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64
PROJECT_VERSION=$(yq -p=xml '.project.version' pom.xml)
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_OUTPUT
- name: Build JARs
run: mvn clean install -DskipTests
# Manually invoke buildx for each service.
# Workaround for https://github.com/quarkusio/quarkus/issues/30424
# Revert to Quarkus-native container build + push once the issue is fixed.
- name: Build and push mirror-service container image
uses: docker/build-push-action@v3
with:
context: ./mirror-service
file: ./mirror-service/src/main/docker/Dockerfile.jvm
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/mirror-service:latest
ghcr.io/${{ github.repository_owner }}/mirror-service:${{ steps.determine-project-version.outputs.PROJECT_VERSION }}
- name: Build and push notification-publisher container image
uses: docker/build-push-action@v3
with:
context: ./notification-publisher
file: ./notification-publisher/src/main/docker/Dockerfile.jvm
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/notification-publisher:latest
ghcr.io/${{ github.repository_owner }}/notification-publisher:${{ steps.determine-project-version.outputs.PROJECT_VERSION }}
- name: Build and push repository-meta-analyzer container image
uses: docker/build-push-action@v3
with:
context: ./repository-meta-analyzer
file: ./repository-meta-analyzer/src/main/docker/Dockerfile.jvm
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/repository-meta-analyzer:latest
ghcr.io/${{ github.repository_owner }}/repository-meta-analyzer:${{ steps.determine-project-version.outputs.PROJECT_VERSION }}
- name: Build and push vulnerability-analyzer container image
uses: docker/build-push-action@v3
with:
context: ./vulnerability-analyzer
file: ./vulnerability-analyzer/src/main/docker/Dockerfile.jvm
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/vulnerability-analyzer:latest
ghcr.io/${{ github.repository_owner }}/vulnerability-analyzer:${{ steps.determine-project-version.outputs.PROJECT_VERSION }}
4 changes: 4 additions & 0 deletions mirror-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<artifactId>json</artifactId>
<version>20220924</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-docker</artifactId>
</dependency>
</dependencies>

<build>
Expand Down

0 comments on commit a96a7fe

Please sign in to comment.