Skip to content

Commit

Permalink
Merge pull request #1 from yash-zededa/eve-kernel-amd64-v6.1.38-generic
Browse files Browse the repository at this point in the history
To publish eve-kernel-amd64-v6.1.38-generic
  • Loading branch information
eriknordmark authored Oct 10, 2023
2 parents 1b910c8 + 14e7d01 commit 5a12561
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: eve-kernel build
on: # yamllint disable-line rule:truthy
push:
branches:
- "eve-kernel-amd64-v6.1.38-generic"

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
packages:
runs-on: self-hosted
steps:
- name: Get eve-kernel
uses: actions/checkout@v3
with:
ref: "eve-kernel-amd64-v6.1.38-generic"
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
- name: Build eve-kernel-amd64-v6.1.38-generic
run: |
make -f Makefile.eve BRANCH?=${GITHUB_REF##*/} push-gcc
13 changes: 7 additions & 6 deletions Makefile.eve
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ VERSION=$(shell git rev-parse --short HEAD)
DIRTY=$(shell git diff --quiet || echo '-dirty')
EVE_FLAVOR=generic
ARCHITECTURE=amd64
KERNEL_TAG=$(shell git describe --tags --abbrev=0)
BRANCH=eve-kernel-$(ARCHITECTURE)-$(KERNEL_TAG)-$(EVE_FLAVOR)
PLATFORM=linux/$(ARCHITECTURE)

SOURCE_DATE_EPOCH=$(shell git log -1 --format=%ct)
BRANCH=eve-kernel-$(ARCHITECTURE)-v6.1.38-$(EVE_FLAVOR)
# make sure we get a date in correct format, otherwise initramfs cpio mtime will be variable
KBUILD_BUILD_TIMESTAMP=$(shell git log -1 --format=%cd | cut -f1 -d"+")


.PHONY: all help

all: kernel-gcc
Expand All @@ -25,15 +24,17 @@ help: Makefile
@echo " docker-tag-gcc: print docker tag for gcc kernel"
@echo " docker-tag-clang: print docker tag for clang kernel"
@echo

kernel-%: Dockerfile.%
@echo "Building kernel version $(BRANCH):$(VERSION)-$* with compiler $*"
docker buildx build \
--build-arg="SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH)" \
--build-arg="KBUILD_BUILD_TIMESTAMP=$(KBUILD_BUILD_TIMESTAMP)" \
--platform $(PLATFORM) -t $(BRANCH):$(VERSION)-$* --load -f Dockerfile.$* .
--platform $(PLATFORM) -t lf-edge/eve-kernel:$(BRANCH)-$(VERSION)$(DIRTY)-$* --load -f Dockerfile.$* .

docker-tag-%:
@echo "docker.io/lfedge/eve-kernel:$(BRANCH)-$(VERSION)$(DIRTY)-$*"


push-%: kernel-%
$(if $(DIRTY), $(error "Not pushing since the repo is dirty"))
docker push lf-edge/eve-kernel:$(BRANCH)-$(VERSION)-$*

0 comments on commit 5a12561

Please sign in to comment.