diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aeef3f1..f5213a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,9 +7,6 @@ jobs: name: build runs-on: self-hosted steps: - env: - USERNAME: ${{ secrets.ZOTHUB_USERNAME }} - PASSWORD: ${{ secrets.ZOTHUB_PASSWORD }} - name: Set up environment run: | mkdir ~/bin @@ -74,13 +71,19 @@ jobs: run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: publish provision and install layer if: startsWith(github.ref, 'refs/tags/') - 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 + 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 }} build_arm64: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 68900e3..7a46670 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,6 @@ 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. @@ -67,11 +65,6 @@ $(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 @@ -91,13 +84,9 @@ STACKER_SUBS = \ STACKER_OPTS = --layer-type=squashfs $(STACKER_SUBS) .PHONY: layers -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) +layers: mosctl + stacker build $(STACKER_OPTS) --stacker-file layers/provision/stacker.yaml + stacker build $(STACKER_OPTS) --stacker-file layers/install/stacker.yaml .PHONY: test test: deps