From 4d9dee573a2b2f17e99836a1efa88c1fc27327c0 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Tue, 21 Nov 2023 01:28:21 +0000 Subject: [PATCH] ci: fix publish path Signed-off-by: Ramkumar Chinchani --- .github/workflows/build.yml | 23 ++++++++++------------- Makefile | 17 ++++++++++++++--- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5213a2..aeef3f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,9 @@ jobs: name: build runs-on: self-hosted steps: + env: + USERNAME: ${{ secrets.ZOTHUB_USERNAME }} + PASSWORD: ${{ secrets.ZOTHUB_PASSWORD }} - name: Set up environment run: | mkdir ~/bin @@ -71,19 +74,13 @@ jobs: run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: publish provision and install layer if: startsWith(github.ref, 'refs/tags/') - uses: project-stacker/stacker-build-push-action@main - with: - version: v1.0.0-rc8 - file: 'layers/stacker.yaml' - build-args: | - ZOT_VERSION=2.0.0-rc5 - ROOTFS_VERSION=v0.0.17.231018 - TOPDIR=${{ env.TOPDIR }} - url: docker://zothub.io/machine/bootkit - layer-type: squashfs - tags: ${{ env.RELEASE_VERSION }} - username: ${{ secrets.ZOTHUB_USERNAME }} - password: ${{ secrets.ZOTHUB_PASSWORD }} + run: | + make publish + env: + ZOT_VERSION=2.0.0-rc5 + ROOTFS_VERSION=v0.0.17.231018 + TOPDIR=${{ env.TOPDIR }} + URL=docker://zothub.io/machine/bootkit build_arm64: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 7a46670..68900e3 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,8 @@ ORAS := $(TOOLSDIR)/bin/oras ORAS_VERSION := 1.0.0-rc.1 REGCTL := $(TOOLSDIR)/bin/regctl REGCTL_VERSION := 0.5.0 +STACKER := $(TOOLSDIR)/bin/stacker +STACKER_VERSION := v1.0.0-rc8 TOPDIR := $(shell git rev-parse --show-toplevel) #BOOTKIT_VERSION ?= "v0.0.17.231018" # We need a bootkit with new mosctl which knows about the new network. @@ -65,6 +67,11 @@ $(REGCTL): curl -Lo $(REGCTL) https://github.com/regclient/regclient/releases/download/v$(REGCTL_VERSION)/regctl-linux-$(arch) chmod +x $(REGCTL) +$(STACKER): + mkdir -p $(TOOLSDIR)/bin + curl -Lo $(STACKER) https://github.com/project-stacker/stacker/releases/download/$(STACKER_VERSION)/stacker + chmod +x $(STACKER) + .PHONY: gofmt gofmt: .made-gofmt @@ -84,9 +91,13 @@ STACKER_SUBS = \ STACKER_OPTS = --layer-type=squashfs $(STACKER_SUBS) .PHONY: layers -layers: mosctl - stacker build $(STACKER_OPTS) --stacker-file layers/provision/stacker.yaml - stacker build $(STACKER_OPTS) --stacker-file layers/install/stacker.yaml +layers: mosctl $(STACKER) + $(STACKER) build $(STACKER_OPTS) --stacker-file layers/provision/stacker.yaml + $(STACKER) build $(STACKER_OPTS) --stacker-file layers/install/stacker.yaml + +.PHONY: publish +publish: layers + $(STACKER) publish $(STACKER_OPTS) --stacker-file layers/provision/stacker.yaml --url $(URL) --username $(USERNAME) --password $(PASSWORD) .PHONY: test test: deps