Skip to content

Commit

Permalink
ci(ld): handle provenance
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Feb 5, 2024
1 parent 8fecd01 commit 4196737
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions .github/workflows/ld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ on:
- 'src/ld/**'
- 'docker-bake.hcl'

env:
# needs latest for output platform-split support
BUILDKIT_IMAGE: "moby/buildkit:latest"

jobs:
binutils-targets:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -91,8 +87,6 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v4
Expand All @@ -101,10 +95,22 @@ jobs:
set: |
ld64-static-tgz.cache-from=type=gha,scope=ld64-static-tgz
ld64-static-tgz.cache-to=type=gha,scope=ld64-static-tgz
ld64-static-tgz.output=type=local,dest=./dist,platform-split=false
ld64-static-tgz.output=type=local,dest=./dist
-
name: List artifacts
name: Rename provenance
run: |
for pdir in ./dist/*/; do
(
cd "$pdir"
binname=$(find . -name '*.tar.gz')
filename=$(basename "${binname%.tar.gz}")
mv "provenance.json" "${filename}.provenance.json"
)
done
-
name: Move and list artifacts
run: |
mv ./dist/**/* ./dist/
tree -nh ./dist
-
name: Upload artifacts
Expand Down Expand Up @@ -153,8 +159,6 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v4
Expand All @@ -163,10 +167,22 @@ jobs:
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
*.output=type=local,dest=./dist,platform-split=false
*.output=type=local,dest=./dist
-
name: List artifacts
name: Rename provenance
run: |
for pdir in ./dist/*/; do
(
cd "$pdir"
binname=$(find . -name '*.tar.gz')
filename=$(basename "${binname%.tar.gz}")
mv "provenance.json" "${filename}.provenance.json"
)
done
-
name: Move and list artifacts
run: |
mv ./dist/**/* ./dist/
tree -nh ./dist
-
name: Upload artifacts
Expand All @@ -190,8 +206,6 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v4
Expand All @@ -213,8 +227,6 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v4
Expand Down

0 comments on commit 4196737

Please sign in to comment.