Skip to content

Commit

Permalink
Update for 3.2.Final branch
Browse files Browse the repository at this point in the history
  • Loading branch information
edeandrea authored Sep 11, 2023
1 parent 8eaa51e commit 3594e3a
Showing 1 changed file with 17 additions and 49 deletions.
66 changes: 17 additions & 49 deletions .github/workflows/build-push-container-images-3.2.Final.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ jobs:
- name: Create env vars
working-directory: ${{ matrix.project }}
run: |
echo "QUARKUS_VERSION=$(./mvnw help:evaluate -Dexpression=quarkus.platform.version -q -DforceStdout)" >> $GITHUB_ENV &&
echo "APP_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV &&
if [[ ${{ matrix.java }} == '17' ]]; then
echo "JVM_DOCKERFILE=Dockerfile.jvm" >> "$GITHUB_ENV"
else
Expand All @@ -73,7 +71,7 @@ jobs:
- name: Create container tags
working-directory: ${{ matrix.project }}
run: echo "CONTAINER_TAG=${{ env.APP_VERSION }}-quarkus-${{ env.QUARKUS_VERSION }}-java${{ matrix.java }}" >> $GITHUB_ENV
run: echo "CONTAINER_TAG=java${{ matrix.java }}-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Set up QEMU
if: matrix.arch == 'arm64'
Expand All @@ -94,14 +92,14 @@ jobs:
-Dquarkus.http.host=0.0.0.0 \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=false \
-Dquarkus.container-image.tag=${{ env.CONTAINER_TAG }}-${{ matrix.arch }} \
-Dquarkus.container-image.tag=${{ env.CONTAINER_TAG }} \
-Dquarkus.docker.dockerfile-jvm-path=src/main/docker/${{ env.JVM_DOCKERFILE }} \
-Dquarkus.docker.buildx.platform=linux/${{ matrix.arch }}
- name: Save JVM Image (${{ matrix.project }}-java${{ matrix.java }}-${{ matrix.arch }})
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.CONTAINER_TAG }}-${{ matrix.arch }}"
image: "${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.CONTAINER_TAG }}"

build-native-images:
if: ((github.event_name == 'workflow_dispatch') || ((github.event_name == 'workflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch')) && (github.event.workflow_run.conclusion == 'success'))) && ((github.repository == 'quarkusio/quarkus-super-heroes') && ((github.event.workflow_run.head_branch == '3.2.Final')))
Expand Down Expand Up @@ -142,15 +140,9 @@ jobs:
distribution: temurin
cache: maven

- name: Create env vars
working-directory: ${{ matrix.project }}
run: |
echo "QUARKUS_VERSION=$(./mvnw help:evaluate -Dexpression=quarkus.platform.version -q -DforceStdout)" >> $GITHUB_ENV && \
echo "APP_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Create container tags
- name: Create container tag
working-directory: ${{ matrix.project }}
run: echo "CONTAINER_TAG=${{ env.APP_VERSION }}-quarkus-${{ env.QUARKUS_VERSION }}-native" >> $GITHUB_ENV
run: echo "CONTAINER_TAG=native-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Set up QEMU
if: matrix.arch == 'arm64'
Expand All @@ -174,13 +166,13 @@ jobs:
-Dquarkus.native.container-runtime-options=--platform=linux/${{ matrix.arch }} \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=false \
-Dquarkus.container-image.tag=${{ env.CONTAINER_TAG }}-${{ matrix.arch }} \
-Dquarkus.container-image.tag=${{ env.CONTAINER_TAG }} \
-Dquarkus.docker.buildx.platform=linux/${{ matrix.arch }}
- name: Save native Image (${{ matrix.project }}-java${{ matrix.java }}-${{ matrix.arch }})
uses: ishworkh/docker-image-artifact-upload@v1
with:
image: "${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.CONTAINER_TAG }}-${{ matrix.arch }}"
image: "${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.CONTAINER_TAG }}"

push-app-images:
if: ((github.event_name == 'workflow_dispatch') || ((github.event_name == 'workflow_run') && ((github.event.workflow_run.event == 'push') || (github.event.workflow_run.event == 'workflow_dispatch')) && (github.event.workflow_run.conclusion == 'success'))) && ((github.repository == 'quarkusio/quarkus-super-heroes') && ((github.event.workflow_run.head_branch == '3.2.Final')))
Expand Down Expand Up @@ -226,30 +218,20 @@ jobs:
distribution: temurin
cache: maven

- name: Create env vars
working-directory: ${{ matrix.project }}
run: |
echo "QUARKUS_VERSION=$(./mvnw help:evaluate -Dexpression=quarkus.platform.version -q -DforceStdout)" >> $GITHUB_ENV &&
echo "APP_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Create container tags (JVM)
- name: Create container tag (JVM)
if: matrix.kind == ''
working-directory: ${{ matrix.project }}
run: |
echo "CONTAINER_TAG=${{ env.APP_VERSION }}-quarkus-${{ env.QUARKUS_VERSION }}-${{ matrix.kind }}java${{ matrix.java }}" >> $GITHUB_ENV &&
echo "ADDITIONAL_TAG=${{ matrix.kind }}java${{ matrix.java }}-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}" >> $GITHUB_ENV
run: echo "CONTAINER_TAG=java${{ matrix.java }}-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Create container tags (native)
- name: Create container tag (native)
if: matrix.kind == 'native-'
working-directory: ${{ matrix.project }}
run: |
echo "CONTAINER_TAG=${{ env.APP_VERSION }}-quarkus-${{ env.QUARKUS_VERSION }}-native" >> $GITHUB_ENV &&
echo "ADDITIONAL_TAG=${{ matrix.kind }}${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}" >> $GITHUB_ENV
run: echo "CONTAINER_TAG=native-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Get saved images (${{ matrix.project }}:${{ env.CONTAINER_TAG }}-${{ matrix.arch }})
- name: Get saved images (${{ matrix.project }}:${{ env.CONTAINER_TAG }})
uses: ishworkh/docker-image-artifact-download@v1
with:
image: "${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.CONTAINER_TAG }}-${{ matrix.arch }}"
image: "${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.CONTAINER_TAG }}"

- name: Login to quay
uses: docker/login-action@v2
Expand All @@ -258,10 +240,6 @@ jobs:
username: ${{ secrets.QUAY_REPO_USERNAME }}
password: ${{ secrets.QUAY_REPO_TOKEN }}

- name: Tag image
working-directory: ${{ matrix.project }}
run: "docker tag ${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.CONTAINER_TAG }}-${{ matrix.arch }} ${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}:${{ env.ADDITIONAL_TAG }}-${{ matrix.arch }}"

- name: Push images
working-directory: ${{ matrix.project }}
run: "docker push -a ${{ env.IMAGE_BASE_NAME }}/${{ matrix.project }}"
Expand Down Expand Up @@ -305,25 +283,15 @@ jobs:
distribution: temurin
cache: maven

- name: Create env vars
working-directory: ${{ matrix.project }}
run: |
echo "QUARKUS_VERSION=$(./mvnw help:evaluate -Dexpression=quarkus.platform.version -q -DforceStdout)" >> $GITHUB_ENV &&
echo "APP_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Create container tags (JVM)
- name: Create container tag (JVM)
if: matrix.kind == ''
working-directory: ${{ matrix.project }}
run: |
echo "CONTAINER_TAG=${{ env.APP_VERSION }}-quarkus-${{ env.QUARKUS_VERSION }}-${{ matrix.kind }}java${{ matrix.java }}" >> $GITHUB_ENV &&
echo "ADDITIONAL_TAG=${{ matrix.kind }}java${{ matrix.java }}-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}" >> $GITHUB_ENV
run: echo "CONTAINER_TAG=java${{ matrix.java }}-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}" >> $GITHUB_ENV

- name: Create container tags (native)
- name: Create container tag (native)
if: matrix.kind == 'native-'
working-directory: ${{ matrix.project }}
run: |
echo "CONTAINER_TAG=${{ env.APP_VERSION }}-quarkus-${{ env.QUARKUS_VERSION }}-native" >> $GITHUB_ENV &&
echo "ADDITIONAL_TAG=${{ matrix.kind }}${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}" >> $GITHUB_ENV
run: echo "CONTAINER_TAG=native-${{ env.LATEST_IMAGE_TAG }}-${{ env.BRANCH }}" >> $GITHUB_ENV

- name: Login to quay
uses: docker/login-action@v2
Expand Down

0 comments on commit 3594e3a

Please sign in to comment.