Skip to content

chore(ci): update value yamls, fix artifact paths, and disable unused K8s plugins #18639

chore(ci): update value yamls, fix artifact paths, and disable unused K8s plugins

chore(ci): update value yamls, fix artifact paths, and disable unused K8s plugins #18639

Workflow file for this run

# Copyright Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: PR Build Image (Hermetic)
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.event.pull_request.head.ref }}
cancel-in-progress: true
env:
REGISTRY: quay.io
IMAGE_NAME: rhdh-community/rhdh
jobs:
build-image:
name: Build Image
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
persist-credentials: false
- name: Check Image and Relevant Changes
id: check-image
uses: ./.github/actions/check-image-and-changes
- name: Store isSkipped status
env:
IS_SKIPPED: ${{ steps.check-image.outputs.is_skipped }}
run: |
mkdir -p ./rhdh-skip-artifacts
echo "$IS_SKIPPED" > ./rhdh-skip-artifacts/isSkipped.txt
- name: Upload isSkipped status
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
env:
ARTIFACT_NAME: pr-${{ github.event.number }}-${{ env.SHORT_SHA }}-isSkipped
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./rhdh-skip-artifacts/isSkipped.txt
retention-days: 1
if-no-files-found: error
- name: Debug outputs
env:
IMAGE_EXISTS: ${{ steps.check-image.outputs.image_exists }}
RELEVANT_CHANGES: ${{ steps.check-image.outputs.relevant_changes }}
PR_NUMBER: ${{ github.event.number }}
run: |
echo "Image exists: $IMAGE_EXISTS"
echo "Relevant changes: $RELEVANT_CHANGES"
echo "SHORT_SHA: $SHORT_SHA"
echo "PR Number: $PR_NUMBER"
echo "Base Tag: pr-$PR_NUMBER"
echo "Commit Tag: pr-$PR_NUMBER-$SHORT_SHA"
- name: Get the latest commits from base branch
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
run: |
git remote add base-origin https://github.com/"$GITHUB_REPOSITORY" || true
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
echo "Updating PR with latest commits from $GITHUB_BASE_REF ..."
git fetch base-origin "$GITHUB_BASE_REF"
git merge --no-edit base-origin/"$GITHUB_BASE_REF"
- name: Build Image (Hermetic)
if: ${{ steps.check-image.outputs.is_skipped != 'true' }}
uses: ./.github/actions/docker-build
with:
imageName: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
imageTags: |
pr-${{ github.event.number }}
pr-${{ github.event.number }}-${{ env.SHORT_SHA }}
imageLabels: quay.expires-after=14d
platform: linux/amd64