Skip to content

chore: Update from ubi9/ubi:9.5-1736404036 to ubi9/ubi:9.5-1739449058 #4

chore: Update from ubi9/ubi:9.5-1736404036 to ubi9/ubi:9.5-1739449058

chore: Update from ubi9/ubi:9.5-1736404036 to ubi9/ubi:9.5-1739449058 #4

Workflow file for this run

#
# Copyright (c) 2021-2025 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: Pull Request Check
# Trigger the workflow on pull request
on: [pull_request]
jobs:
build-base-image:
name: Build base image
strategy:
fail-fast: false
matrix:
runners: ['ubuntu-22.04', 'ubuntu-22.04-arm']
runs-on: ${{matrix.runners}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set arch environment variable
run: |
if [[ ${{matrix.runners}} == 'ubuntu-22.04' ]]; then
echo arch="amd64" >> $GITHUB_ENV
else
echo arch="arm64" >> $GITHUB_ENV
fi
- name: Free runner space
run: sudo rm -rf /usr/local/lib/android
- name: Cleanup docker images
run: docker system prune -af
- name: Build base image
run: |
cd base/ubi9 && docker buildx build \
--platform linux/${{env.arch}} \
--progress=plain \
-t base-developer-image-${{env.arch}} .
- name: Display docker images
run: docker images
- name: Compress image to a file
run: docker save base-developer-image-${{env.arch}} | gzip > base-developer-image-${{env.arch}}.tgz
- name: Upload image artifact
uses: actions/upload-artifact@v4
with:
name: base-developer-image-${{env.arch}}
path: base-developer-image-${{env.arch}}.tgz
build-udi:
name: Build udi
strategy:
fail-fast: false
matrix:
runners: ['ubuntu-22.04', 'ubuntu-22.04-arm']
runs-on: ${{matrix.runners}}
needs: build-base-image
steps:
- name: Set arch environment variable
run: |
if [[ ${{matrix.runners}} == 'ubuntu-22.04' ]]; then
echo arch="amd64" >> $GITHUB_ENV
else
echo arch="arm64" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v4
- name: Free runner space
run: sudo rm -rf /usr/local/lib/android
- name: Cleanup docker images
run: docker system prune -af
- name: Download BDI artifacts
uses: actions/download-artifact@v4
with:
pattern: base-developer-image-*
merge-multiple: true
path: .
- name: List downloaded files
run: ls -lah
- name: Load docker images
run: docker load -i base-developer-image-${{env.arch}}.tgz
- name: Display docker images
run: docker images
- name: Update UDI Dockerfile
run: sed "s|quay.io/devfile/base-developer-image:ubi9-latest|base-developer-image-${{env.arch}}|" -i "universal/ubi9/Dockerfile"
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build udi
run: |
cd universal/ubi9 && docker buildx build \
--platform linux/${{env.arch}} \
--progress=plain \
--push \
-t quay.io/devfile/universal-developer-image:${{env.arch}}-pr-${{github.event.number}} .
publish-udi:
name: Publish udi
runs-on: ubuntu-22.04
needs: build-udi
steps:
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: publish
run: |
docker manifest create quay.io/devfile/universal-developer-image:pr-${{github.event.number}} \
--amend quay.io/devfile/universal-developer-image:amd64-pr-${{github.event.number}} \
--amend quay.io/devfile/universal-developer-image:arm64-pr-${{github.event.number}}
docker manifest annotate quay.io/devfile/universal-developer-image:pr-${{github.event.number}} \
quay.io/devfile/universal-developer-image:amd64-pr-${{github.event.number}} \
--os linux --arch amd64
docker manifest annotate quay.io/devfile/universal-developer-image:pr-${{github.event.number}} \
quay.io/devfile/universal-developer-image:arm64-pr-${{github.event.number}} \
--os linux --arch arm64
docker manifest push quay.io/devfile/universal-developer-image:pr-${{github.event.number}}
- name: 'Comment PR'
uses: actions/github-script@v7
with:
script: |
const { repo: { owner, repo } } = context;
await github.rest.issues.createComment({
issue_number: ${{github.event.number}},
owner: context.repo.owner,
repo: context.repo.repo,
body: `Pull Request images published ✨\n\nUDI: [quay.io/devfile/universal-developer-image:pr-${{github.event.number}}](https://quay.io/devfile/universal-developer-image:pr-${{github.event.number}})`
})