1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

don't create a separate ubi container

This commit is contained in:
Jason N. 2024-03-20 09:50:37 -04:00
parent 1e6b2d5bc0
commit f7d0f5bf5c
7 changed files with 61 additions and 49 deletions

View file

@ -7,11 +7,6 @@ on:
parent_job_name:
required: true
type: string
secrets:
RH_REPO:
required: true
RH_ENT:
required: true
jobs:
@ -28,19 +23,6 @@ jobs:
contents: read
packages: write
statuses: write
continue-on-error: false
strategy:
fail-fast: false
matrix:
os:
- registry.fedoraproject.org/fedora
- registry.access.redhat.com/ubi8/ubi
include:
- os: registry.fedoraproject.org/fedora
tag: 39
- os: registry.access.redhat.com/ubi8/ubi
tag: latest
append: ubi
steps:
- name: Checkout
@ -85,7 +67,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}${{ matrix.append && format('-{0}', matrix.append) }}
ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
@ -98,19 +80,10 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}${{ matrix.append && format('-{0}', matrix.append) }}
ghcr.io/${{ github.repository }}
tags: |
pr-${{ inputs.pr }}
- name: Get UBI Subs
if: matrix.append == 'ubi'
uses: actions/checkout@v4
with:
repository: ${{ secrets.RH_REPO }}
ssh-key: ${{ secrets.RH_ENT }}
persist-credentials: false
path: ubi
- name: Buildah Build
id: build-image
uses: redhat-actions/buildah-build@v2
@ -118,11 +91,6 @@ jobs:
containerfiles: Containerfile
tags: ${{ steps.meta.outputs.tags || steps.meta_pr.outputs.tags }}
labels: ${{ steps.meta.outputs.labels || steps.meta_pr.outputs.labels }}
build-args: |
BASE_IMAGE=${{ matrix.os }}
IMAGE_VERSION=${{ matrix.tag }}
extra-args: |
${{ matrix.append == 'ubi' && format('--volume={0}/ubi:/run/secrets', github.workspace) || ''}}
- name: Push image
uses: redhat-actions/push-to-registry@v2