Skip to content

Commit cc23915

Browse files
authored
parameterize the pkg manager command for image updates (#1003)
Signed-off-by: Mark Nelson <mark.x.nelson@oracle.com>
1 parent fcda6c1 commit cc23915

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/actions/process-image/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ inputs:
1313
push:
1414
description: Boolean to push image (true) or just build (false)
1515
required: true
16+
pkg_command:
17+
description: Package manager command to run during updates (eg microdnf)
18+
required: false
19+
default: microdnf
1620
runs:
1721
using: "composite"
1822
steps:
@@ -35,7 +39,7 @@ runs:
3539
LABEL org.opencontainers.image.description="${{ inputs.description }}"
3640
LABEL org.opencontainers.image.name="${{ inputs.dst_image }}"
3741
LABEL org.opencontainers.image.version="${{ env.date }}"
38-
RUN (microdnf update --refresh --nodocs --best || microdnf update --refresh --nodocs --nobest) && microdnf clean all
42+
RUN (${{ inputs.pkg_command }} update --refresh --nodocs --best || ${{ inputs.pkg_command }} update --refresh --nodocs --nobest) && ${{ inputs.pkg_command }} clean all
3943
#RUN echo "Testing Update Functionality" > /image_digest
4044
RUN rpm -qa | sort | sha256sum | awk '{print $1}' > /image_digest
4145
EOF

.github/workflows/openjdk-base-image.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Build OBaaS Base Image"
1+
name: "Build OBaaS OpenJDK Base Image"
22
on:
33
schedule:
44
- cron: "0 0 * * *"
@@ -65,6 +65,7 @@ jobs:
6565
dst_image: ghcr.io/${{ github.repository_owner }}/${{ env.dst_img }}:${{ matrix.base_version }}
6666
description: ${{ env.description }}
6767
push: false
68+
pkg_command: dnf
6869

6970
- name: Get newest Image Software Digest
7071
id: get_newest_digest

0 commit comments

Comments
 (0)