|
| 1 | +# |
| 2 | +# Copyright (C) 2025 Red Hat, Inc. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | +# SPDX-License-Identifier: Apache-2.0 |
| 17 | + |
| 18 | + |
| 19 | +name: pr-build-extension |
| 20 | + |
| 21 | +on: |
| 22 | + pull_request: |
| 23 | + branches: [ 'main' ] |
| 24 | + |
| 25 | +jobs: |
| 26 | + build-extension: |
| 27 | + name: Build OCI image |
| 28 | + runs-on: ubuntu-24.04 |
| 29 | + steps: |
| 30 | + - name: Checkout repository |
| 31 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 32 | + |
| 33 | + - name: Set image env var |
| 34 | + id: set-image |
| 35 | + run: echo "IMAGE=ghcr.io/${{ github.repository_owner }}/podman-desktop-image-checker-openshift-ext:pr-${{ github.event.pull_request.number }}" >> "$GITHUB_ENV" |
| 36 | + |
| 37 | + - name: Build image with podman |
| 38 | + shell: bash |
| 39 | + run: | |
| 40 | + echo "Building image ${IMAGE} with podman" |
| 41 | + podman build -t "${IMAGE}" -f Containerfile . |
| 42 | + podman save -m -o podman-desktop-image-checker-openshift-ext.tar "${IMAGE}" |
| 43 | + echo "${IMAGE}" > podman-desktop-image-checker-openshift-ext.image |
| 44 | +
|
| 45 | + - name: Upload extension oci flatten images |
| 46 | + uses: actions/upload-artifact@de65e23aa2b7e23d713bb51fbfcb6d502f8667d8 # v4.6.2 |
| 47 | + with: |
| 48 | + name: podman-desktop-image-checker-openshift-ext |
| 49 | + path: podman-desktop-image-checker-openshift-ext* |
0 commit comments