Skip to content

Commit

Permalink
Merge pull request #1 from kubealex/main
Browse files Browse the repository at this point in the history
Workflow refinements
  • Loading branch information
nzwulfin authored Dec 3, 2024
2 parents 3353e70 + 54a876a commit 398ea1e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_rhel_bootc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Build RHEL bootc image with GHA
on:
workflow_dispatch:
push:
branches:
- main
tags:
- '*'

jobs:
subs:
rhel-bootc-image-build:
name: Build RHEL bootc image with repo access
runs-on: ubuntu-latest
env:
IMAGE_NAME: rhel9-cicd-bootc
REGISTRY: ghcr.io/nzwulfin
REGISTRY: ghcr.io/${{ github.actor }}
container:
image: registry.access.redhat.com/ubi9/ubi
options: --privileged
Expand All @@ -32,29 +32,29 @@ jobs:
orgid: ${{ secrets.RHT_ORGID }}
activation_key: ${{ secrets.RHT_ACT_KEY }}
run: subscription-manager register --org=$orgid --activationkey=$activation_key

# workaround for https://github.com/redhat-actions/podman-login/issues/42 since the docker config from the host doesn't come up to the container
- name: Workaround open podman-login action issue
env:
auth: "{ \"auths\": {} }"
run: |
mkdir -p $HOME/.docker
echo $auth > $HOME/.docker/config.json
- name: Log in to the RHT terms based registry
uses: redhat-actions/podman-login@v1
with:
registry: registry.redhat.io
username: ${{ secrets.RHT_REG_SVCUSER }}
password: ${{ secrets.RHT_REG_SVCPASS }}
auth_file_path: /run/containers/0/auth.json

- name: Use buildah bud to create the image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ github.sha }}
tags: latest ${{ github.sha }} ${{ github.ref_name }}
containerfiles: |
Containerfile.httpd
Expand Down

0 comments on commit 398ea1e

Please sign in to comment.