Skip to content

Update Mandrel VM from 22 to 23 (#162) #139

Update Mandrel VM from 22 to 23 (#162)

Update Mandrel VM from 22 to 23 (#162) #139

Workflow file for this run

name: Build of UBI 8 based Developer Images
on:
push:
branches: [ main ]
workflow_call:
# Map the workflow outputs to job outputs
secrets:
QUAY_USERNAME:
required: true
QUAY_PASSWORD:
required: true
outputs:
uniq_tag:
description: "The first output string"
value: ${{ jobs.build_universal_ubi8_image.outputs.output1 }}
jobs:
build_base_ubi8_image:
name: Build and publish base ubi8 image to Quay.io
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free runner space
run: |
sudo rm -rf /usr/local/lib/android
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
quay.io/devfile/base-developer-image
flavor: |
latest=true
prefix=ubi8-,onlatest=true
tags: |
type=sha,prefix=ubi8-,format=short
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker Build & Push Base
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
provenance: false
context: base/ubi8
tags: |
quay.io/devfile/base-developer-image:latest
${{ steps.meta.outputs.tags }}
build_universal_ubi8_image:
name: Build and publish universal ubi8 image to Quay.io
runs-on: ubuntu-22.04
needs: build_base_ubi8_image
# job output for passing to mapping value (the workflow_call section)
outputs:
output1: ${{ steps.setTagName.outputs.uniq_tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free runner space
run: |
sudo rm -rf /usr/local/lib/android
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
quay.io/devfile/universal-developer-image
flavor: |
latest=true
prefix=ubi8-,onlatest=true
tags: |
type=sha,prefix=ubi8-,format=short
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker Build & Push Universal
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
provenance: false
context: universal/ubi8
tags: |
quay.io/devfile/universal-developer-image:latest
${{ steps.meta.outputs.tags }}
- name: Get tag with uniq prefix
id: setTagName
# set the image with uniq tag prefix (for example: quay.io/..../base-developer-image:ubi8-7ad6cab) to env. var
# and define it for output. This output with tag image will be used in caller job
run: |
UNIQ_TAG_IMAGE=$(echo $DOCKER_METADATA_OUTPUT_JSON | jq .tags[0])
echo "...................$UNIQ_TAG_IMAGE"
echo "uniq_tag=$UNIQ_TAG_IMAGE" >> $GITHUB_OUTPUT