-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: workflows: build kernel development containers
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build kernel development containers | ||
|
||
permissions: | ||
packages: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- '.github/workflows/container.yml' | ||
- 'container/**' | ||
|
||
pull_request: | ||
branches: | ||
- 'main' | ||
paths: | ||
- '.github/workflows/container.yml' | ||
- 'container/**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
image: | ||
- rockylinux-8-kernel-devel | ||
- ubuntu-22.04-kernel-devel | ||
|
||
env: | ||
image: ghcr.io/ofs/linux-dfl-backport/${{ matrix.image }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build kernel development image | ||
run: docker build -t "$image" -f container/${{ matrix.image }}/Dockerfile . | ||
|
||
- name: Log in to registry | ||
if: github.event_name == 'push' | ||
run: echo "$token" | docker login ghcr.io -u "$GITHUB_REPOSITORY_OWNER" --password-stdin | ||
env: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push image to registry | ||
if: github.event_name == 'push' | ||
run: docker image push "$image" |