CI: update versions sed fix #69
Workflow file for this run
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: ICR | build and push | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Tag for images' | ||
required: true | ||
release: | ||
types: [published] | ||
jobs: | ||
icr_build_and_push: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- imagename: quantum-serverless-ray-node | ||
pythonversion: py38 | ||
dockerfile: Dockerfile-ray-node | ||
platforms: linux/amd64 | ||
- imagename: quantum-serverless-ray-node | ||
pythonversion: py39 | ||
dockerfile: Dockerfile-ray-node | ||
platforms: linux/amd64,linux/arm64 | ||
- imagename: quantum-serverless-ray-node | ||
pythonversion: py310 | ||
dockerfile: Dockerfile-ray-node | ||
platforms: linux/amd64 | ||
- imagename: quantum-repository-server | ||
pythonversion: '' | ||
dockerfile: ./repository/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
- imagename: quantum-serverless-gateway | ||
pythonversion: '' | ||
dockerfile: ./gateway/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Login to IBM Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: icr.io | ||
username: iamapikey | ||
password: ${{ secrets.IBMCLOUD_API_KEY }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: 'arm64,amd64' | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Build and push on dispatch | ||
if : github.event_name == 'workflow_dispatch' | ||
uses: ./.github/actions/icr-build-and-push-images | ||
with: | ||
tag: ${{ github.event.inputs.tag }} | ||
name: ${{ matrix.imagename }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
platforms: ${{ matrix.platforms }} | ||
pythonversion: ${{ matrix.pythonversion }} | ||
- name: Set version from tag | ||
if : github.event_name == 'release' && github.event.action == 'published' | ||
id: set-version-from-tag | ||
run: echo "VERSION=${GITHUB_REF_NAME/v}" >> $GITHUB_OUTPUT | ||
- name: Build and push on release | ||
if : github.event_name == 'release' && github.event.action == 'published' | ||
uses: ./.github/actions/icr-build-and-push-images | ||
with: | ||
tag: ${{ steps.set-version-from-tag.outputs.VERSION }} | ||
name: ${{ matrix.imagename }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
platforms: ${{ matrix.platforms }} | ||
pythonversion: ${{ matrix.pythonversion }} |