Skip to content

Commit

Permalink
[NO-ISSUE] Add step to update base image
Browse files Browse the repository at this point in the history
  • Loading branch information
brusdev committed Oct 29, 2024
1 parent 1c06e4e commit 5107c4b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ on:
required: true
default: true
type: boolean
base_image:
description: 'Base image'
required: false
default: 'latest'
type: string
update_base_image:
description: 'Update base image'
required: true
default: true
type: boolean
update_related_images:
description: 'Update related images'
required: true
Expand Down Expand Up @@ -63,6 +73,17 @@ jobs:
make build && make generate-deploy && make bundle && git status
git commit --all --message "Update version to ${VERSION}" || echo "nothing to commit"
- name: Update base image
if: ${{ inputs.update_base_image }}
run: |
if [ "${{ inputs.base_image }}" = "latest" ]; then
BASE_IMAGE="registry.access.redhat.com/ubi8:$(basename $(skopeo inspect docker://registry.access.redhat.com/ubi8:latest | jq -r '.Labels.url'))"
else
BASE_IMAGE="${{ inputs.base_image }}"
fi
sed -i "s~FROM.*base-env~FROM ${BASE_IMAGE} base-env~" Dockerfile
git commit --all --message "Update base image to ${BASE_IMAGE}" || echo "nothing to commit"
- name: Update related images
if: ${{ inputs.update_related_images }}
run: |
Expand Down

0 comments on commit 5107c4b

Please sign in to comment.