archutil: refactor generation and validation #16
Workflow file for this run
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
name: archutil | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
- 'v[0-9]+.[0-9]+' | |
pull_request: | |
env: | |
SETUP_BUILDX_VERSION: "latest" | |
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest" | |
DESTDIR: "./bin" | |
jobs: | |
exits: | |
runs-on: ubuntu-22.04 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- | |
name: Prepare | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cpuid | |
go install github.com/tonistiigi/go-archvariant/cmd/amd64variant@master | |
- | |
name: Show cpuinfo | |
run: | | |
cat /proc/cpuinfo | |
- | |
name: Show cpuid | |
run: | | |
cpuid | |
- | |
name: Show amd64 variant | |
run: | | |
amd64variant | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: ${{ env.SETUP_BUILDX_VERSION }} | |
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }} | |
buildkitd-flags: --debug | |
- | |
name: Generate exits | |
uses: docker/bake-action@v4 | |
with: | |
targets: archutil-exits | |
provenance: false | |
- | |
name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archutil-exits | |
path: ${{ env.DESTDIR }}/* | |
if-no-files-found: error |