Skip to content

Commit

Permalink
migrate to ghcr.io package registry (#1450)
Browse files Browse the repository at this point in the history
* migrate to ghcr.io package registry

* build and publish to ghcr.io
  • Loading branch information
schmidma authored Oct 2, 2024
1 parent 6b34bb1 commit 0342b0f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 29 deletions.
41 changes: 36 additions & 5 deletions .github/workflows/ci-image.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
name: CI Image
name: Build and Push CI Image
on:
workflow_dispatch

env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
build:
name: Build
name: Build and Push CI Image
runs-on:
- self-hosted
- v3

steps:
- uses: actions/checkout@v4
- run: docker build --tag 134.28.57.223:5000/hulk:1.78.0 tools/ci/github-runners
- run: docker push 134.28.57.223:5000/hulk:1.78.0
- uses: actions/checkout@v4

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: hulk-ci
tags: latest 1.78.0 ${{ github.sha }}
containerfiles: |
tools/ci/github-runners/Containerfile
- name: Log in to ghcr.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}

- name: Push To ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}"
14 changes: 7 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- self-hosted
- v3
container:
image: 134.28.57.223:5000/hulk:1.78.0
image: ghcr.io/hulks/hulk-ci:1.78.0
options: --user=1000:1000
steps:
- uses: actions/checkout@v4
Expand All @@ -41,7 +41,7 @@ jobs:
- self-hosted
- v3
container:
image: 134.28.57.223:5000/hulk:1.78.0
image: ghcr.io/hulks/hulk-ci:1.78.0
options: --user=1000:1000
steps:
- uses: actions/checkout@v4
Expand All @@ -58,7 +58,7 @@ jobs:
- self-hosted
- v3
container:
image: 134.28.57.223:5000/hulk:1.78.0
image: ghcr.io/hulks/hulk-ci:1.78.0
options: --user=1000:1000
steps:
- uses: actions/checkout@v4
Expand All @@ -74,7 +74,7 @@ jobs:
- self-hosted
- v3
container:
image: 134.28.57.223:5000/hulk:1.78.0
image: ghcr.io/hulks/hulk-ci:1.78.0
options: --user=1000:1000
steps:
- uses: actions/checkout@v4
Expand All @@ -90,7 +90,7 @@ jobs:
- self-hosted
- v3
container:
image: 134.28.57.223:5000/hulk:1.78.0
image: ghcr.io/hulks/hulk-ci:1.78.0
options: --user=1000:1000
steps:
- uses: actions/checkout@v4
Expand All @@ -111,7 +111,7 @@ jobs:
- self-hosted
- v3
container:
image: 134.28.57.223:5000/hulk:1.78.0
image: ghcr.io/hulks/hulk-ci:1.78.0
options: --user=1000:1000
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
- self-hosted
- v3
container:
image: 134.28.57.223:5000/hulk:1.78.0
image: ghcr.io/hulks/hulk-ci:1.78.0
options: --user=1000:1000
steps:
- uses: actions/checkout@v4
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/ci/github-runners/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Build root filesystem

- Install [distrobuilder](https://linuxcontainers.org/distrobuilder/introduction/)
- Build via `distrobuilder build-lxc --compression zstd v3.yaml`
- Build via `distrobuilder build-lxc --compression zstd actions-runner.yaml`
- The root filesystem is named `rootfs.tar.zst`

## Upload root filesystem to Proxmox
Expand Down
File renamed without changes.
16 changes: 0 additions & 16 deletions tools/ci/github-runners/docker-compose.yml

This file was deleted.

0 comments on commit 0342b0f

Please sign in to comment.