🐛 .net: handle all progress messages we might see (#669) #227
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Multiple Architecture Image Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'main' | |
- 'release-*' | |
tags: | |
- 'v*' | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
tag: ${{ github.ref == 'refs/heads/main' && 'latest' || github.ref_name }} | |
jobs: | |
image-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
images: | |
- name: analyzer-lsp | |
containerfile: "./Dockerfile" | |
pre_build_cmd: | | |
TAG=${GITHUB_REF_NAME/main/latest} | |
sed -i "s,FROM quay.io/konveyor/jdtls-server-base.*,FROM quay.io/konveyor/jdtls-server-base:${TAG}," Dockerfile | |
context: "." | |
architectures: '[ "amd64", "arm64" ]' | |
- name: dotnet-external-provider | |
containerfile: "./external-providers/dotnet-external-provider/Dockerfile" | |
context: "." | |
architectures: '[ "amd64", "arm64" ]' | |
- name: golang-dependency-provider | |
containerfile: "./external-providers/golang-dependency-provider/Dockerfile" | |
context: "." | |
architectures: '[ "amd64", "arm64" ]' | |
- name: yq-external-provider | |
containerfile: "./external-providers/yq-external-provider/Dockerfile" | |
context: "." | |
architectures: '[ "amd64", "arm64" ]' | |
- name: java-external-provider | |
containerfile: "./external-providers/java-external-provider/Dockerfile" | |
context: "." | |
architectures: '[ "amd64", "arm64" ]' | |
pre_build_cmd: | | |
TAG=${GITHUB_REF_NAME/main/latest} | |
sed -i "s,FROM quay.io/konveyor/jdtls-server-base,FROM quay.io/konveyor/jdtls-server-base:${TAG}," Dockerfile | |
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main | |
with: | |
registry: "quay.io/konveyor" | |
image_name: ${{ matrix.images.name }} | |
containerfile: ${{ matrix.images.containerfile }} | |
pre_build_cmd: ${{ matrix.images.pre_build_cmd }} | |
architectures: ${{ matrix.images.architectures }} | |
context: ${{ matrix.images.context }} | |
secrets: | |
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }} | |
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }} | |
# generic provider requires go dep provider we built in matrix and needs to be sequential | |
generic-external-provider-build: | |
needs: image-build | |
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main | |
with: | |
registry: "quay.io/konveyor" | |
image_name: generic-external-provider | |
containerfile: "./external-providers/generic-external-provider/Dockerfile" | |
architectures: '[ "amd64", "arm64" ]' | |
context: "." | |
pre_build_cmd: | | |
TAG=${GITHUB_REF_NAME/main/latest} | |
sed -i "s,FROM quay.io/konveyor/golang-dependency-provider,FROM quay.io/konveyor/golang-dependency-provider:${TAG}," Dockerfile | |
secrets: | |
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }} | |
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }} | |
analyzer-windows-build: | |
needs: image-build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: "quay.io/konveyor" | |
username: ${{ secrets.QUAY_PUBLISH_ROBOT }} | |
password: ${{ secrets.QUAY_PUBLISH_TOKEN }} | |
- name: Docker Build | |
shell: bash | |
run: | | |
TAG=${GITHUB_REF_NAME/main/latest} | |
IMAGE_NAME=quay.io/konveyor/analyzer-lsp:${TAG}-windowsservercore-ltsc2022 | |
docker build -t ${IMAGE_NAME} -f ./Dockerfile.windows . | |
docker push ${IMAGE_NAME} | |
dotnet-windows-build: | |
needs: image-build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: "quay.io/konveyor" | |
username: ${{ secrets.QUAY_PUBLISH_ROBOT }} | |
password: ${{ secrets.QUAY_PUBLISH_TOKEN }} | |
- name: Docker Build | |
shell: bash | |
run: | | |
TAG=${GITHUB_REF_NAME/main/latest} | |
IMAGE_NAME=quay.io/konveyor/dotnet-external-provider:${TAG}-windowsservercore-ltsc2022 | |
docker build -t ${IMAGE_NAME} -f ./external-providers/dotnet-external-provider/Dockerfile.windows . | |
docker push ${IMAGE_NAME} | |
update-analyzer-manifest: | |
needs: | |
- image-build | |
- analyzer-windows-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: update manifest | |
run: | | |
podman manifest create temp | |
podman manifest add temp --all quay.io/konveyor/analyzer-lsp:${tag} | |
podman manifest add temp --all quay.io/konveyor/analyzer-lsp:${tag}-windowsservercore-ltsc2022 | |
podman tag temp quay.io/konveyor/analyzer-lsp:${tag} | |
- name: Push manifest to Quay | |
uses: redhat-actions/push-to-registry@main | |
id: push | |
with: | |
image: konveyor/analyzer-lsp | |
tags: ${{ env.tag }} | |
username: ${{ secrets.QUAY_PUBLISH_ROBOT }} | |
password: ${{ secrets.QUAY_PUBLISH_TOKEN }} | |
registry: quay.io | |
update-dotnet-manifest: | |
needs: | |
- image-build | |
- dotnet-windows-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: update manifest | |
run: | | |
podman manifest create temp | |
podman manifest add temp --all quay.io/konveyor/dotnet-external-provider:${tag} | |
podman manifest add temp --all quay.io/konveyor/dotnet-external-provider:${tag}-windowsservercore-ltsc2022 | |
podman tag temp quay.io/konveyor/dotnet-external-provider:${tag} | |
- name: Push manifest to Quay | |
uses: redhat-actions/push-to-registry@main | |
id: push | |
with: | |
image: konveyor/dotnet-external-provider | |
tags: ${{ env.tag }} | |
username: ${{ secrets.QUAY_PUBLISH_ROBOT }} | |
password: ${{ secrets.QUAY_PUBLISH_TOKEN }} | |
registry: quay.io |