From 83136d44c0e530c893e2166a48268a7d6493c7ae Mon Sep 17 00:00:00 2001 From: vsoch Date: Fri, 26 Jan 2024 12:25:26 -0700 Subject: [PATCH] add support for click and deploy release to test running compspec we need to be able to easily wget into a container and run. Signed-off-by: vsoch --- .github/workflows/release-custom.yaml | 45 +++++++++++++++++++++++++++ Makefile | 14 ++++++--- docs/usage.md | 6 ++++ 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release-custom.yaml diff --git a/.github/workflows/release-custom.yaml b/.github/workflows/release-custom.yaml new file mode 100644 index 0000000..a37385c --- /dev/null +++ b/.github/workflows/release-custom.yaml @@ -0,0 +1,45 @@ +name: compspec-go custom tag and release + +on: + workflow_dispatch: + inputs: + release_tag: + description: Custom release tag + type: string + required: true + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set tag + run: | + echo "Tag for release is ${{ inputs.release_tag }}" + echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV} + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: ^1.20 + + - name: Build + run: | + export PATH=$PWD/bin:$PATH + make + make build-arm + make build-ppc + + - name: Release + uses: softprops/action-gh-release@v1 + with: + name: compspec-go ${{ env.tag }} + tag_name: ${{ env.tag }} + body: "compspec-go release ${{ env.tag }}" + files: | + bin/compsec + bin/compspec-arm + bin/compspec-ppc + env: + GITHUB_REPOSITORY: supercontainers/compspec-go diff --git a/Makefile b/Makefile index 06be510..40c276e 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,19 @@ HERE ?= $(shell pwd) LOCALBIN ?= $(shell pwd)/bin -.PHONY: all build +.PHONY: all -all: build-extract +all: build .PHONY: $(LOCALBIN) $(LOCALBIN): mkdir -p $(LOCALBIN) -build-extract: $(LOCALBIN) - GO111MODULE="on" go build -o $(LOCALBIN)/compspec cmd/compspec/compspec.go \ No newline at end of file +build: $(LOCALBIN) + GO111MODULE="on" go build -o $(LOCALBIN)/compspec cmd/compspec/compspec.go + +build-arm: $(LOCALBIN) + GO111MODULE="on" GOARCH=arm64 go build -o $(LOCALBIN)/compspec-arm cmd/compspec/compspec.go + +build-ppc: $(LOCALBIN) + GO111MODULE="on" GOARCH=ppc64le go build -o $(LOCALBIN)/compspec-ppc cmd/compspec/compspec.go \ No newline at end of file diff --git a/docs/usage.md b/docs/usage.md index 5db1f76..721304c 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -132,6 +132,12 @@ a build will generate it for that context. We would want to save this to file: And that's it! We would next (likely during CI) push this compatibility artifact to a URI that is likely (TBA) linked to the image. For now we will manually remember the pairing, at least until the compatibility working group figures out the final design! +## Check + +Check is the command you would use to check a potential host against one or more existing artifacts. +For a small experiment of using create against a set of containers and then testing how to do a check, we are going to place content +in [examples/check-lammps](examples/check-lammps). + ## Extract Extraction has two use cases, and likely you won't be running this manually, but within the context of another command: