Skip to content

Commit

Permalink
Containerize hammer cli katello devel
Browse files Browse the repository at this point in the history
  • Loading branch information
parthaa committed Feb 4, 2025
1 parent 83ae9db commit 6b20038
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/development-container-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Container release

on:
push:
branches:
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-devel

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Containerfile-devel
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
10 changes: 10 additions & 0 deletions Containerfile-devel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM registry.access.redhat.com/ubi9/ruby-33
RUN wget https://partha.fedorapeople.org/devel/hammer.tgz
RUN tar zxf hammer.tgz
RUN mkdir hammer-cli-katello
RUN cat <<EOF > /opt/app-root/src/.gitconfig
[safe]
directory = /opt/app-root/src/hammer-cli-katello
EOF
WORKDIR hammer-cli-katello
CMD bundle install && bundle exec bash

0 comments on commit 6b20038

Please sign in to comment.