Skip to content

Commit 5424df1

Browse files
committed
[no ci] Build image for downloading the changelogs in cluster
1 parent f839888 commit 5424df1

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 98 - Build and Push Changelogs Downloader Container
2+
on:
3+
workflow_dispatch:
4+
permissions:
5+
# Checkout repository
6+
contents: read
7+
# Push container images
8+
packages: write
9+
jobs:
10+
push-data-ingestion-container:
11+
name: data_ingestion
12+
runs-on: ubuntu-24.04
13+
env:
14+
IMAGE_NAME: gardenlinux/glvd-changelogs-downloader
15+
IMAGE_TAG: latest
16+
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
21+
- name: Install qemu dependency for multi-arch build
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y qemu-user-static
25+
26+
- name: Build Image
27+
id: build_image
28+
uses: redhat-actions/buildah-build@v2
29+
with:
30+
image: ${{ env.IMAGE_NAME }}
31+
tags: ${{ env.IMAGE_TAG }}
32+
platforms: linux/amd64, linux/arm64
33+
containerfiles: |
34+
./Containerfile.changelog-downloader
35+
36+
- name: Push To ghcr.io
37+
id: push-to-ghcr
38+
if: ${{ github.event_name != 'pull_request' }}
39+
uses: redhat-actions/push-to-registry@v2
40+
with:
41+
image: ${{ steps.build_image.outputs.image }}
42+
tags: ${{ steps.build_image.outputs.tags }}
43+
registry: ghcr.io
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Print image details
48+
if: ${{ github.event_name != 'pull_request' }}
49+
run: |
50+
echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}"
51+
echo "Digest ${{ steps.push-to-ghcr.outputs.digest }}"

Containerfile.changelog-downloader

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM python:3
2+
3+
WORKDIR /usr/src/app
4+
5+
RUN pip install --break-system-packages python-debian requests
6+
7+
COPY src/glvd/download_changelog_files.py download_changelog_files.py
8+
9+
CMD [ "python", "./download_changelog_files.py" ]

0 commit comments

Comments
 (0)