Skip to content

Commit 6241e09

Browse files
committed
[2.8] Release artifacts
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
1 parent 1840415 commit 6241e09

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ jobs:
4747
-
4848
name: Set up Docker Buildx
4949
uses: docker/setup-buildx-action@v1
50+
-
51+
name: Build artifacts
52+
uses: docker/bake-action@v1
53+
with:
54+
targets: artifact-all
55+
-
56+
name: Move artifacts
57+
run: |
58+
mv ./bin/**/* ./bin/
59+
-
60+
name: Upload artifacts
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: registry
64+
path: ./bin/*
65+
if-no-files-found: error
5066
-
5167
name: Login to DockerHub
5268
if: github.event_name != 'pull_request'
@@ -63,3 +79,15 @@ jobs:
6379
${{ steps.meta.outputs.bake-file }}
6480
targets: image-all
6581
push: ${{ startsWith(github.ref, 'refs/tags/') }}
82+
-
83+
name: GitHub Release
84+
uses: softprops/action-gh-release@v1
85+
if: startsWith(github.ref, 'refs/tags/')
86+
with:
87+
draft: true
88+
files: |
89+
bin/*.tar.gz
90+
bin/*.zip
91+
bin/*.sha256
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ RUN --mount=type=bind,rw \
2828
--files="LICENSE" \
2929
--files="README.md"
3030

31+
FROM scratch AS artifacts
32+
COPY --from=build /out/*.tar.gz /
33+
COPY --from=build /out/*.zip /
34+
COPY --from=build /out/*.sha256 /
35+
3136
FROM scratch AS binary
3237
COPY --from=build /usr/local/bin/registry* /
3338

docker-bake.hcl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ target "binary" {
1212
output = ["./bin"]
1313
}
1414

15+
target "artifact" {
16+
target = "artifacts"
17+
output = ["./bin"]
18+
}
19+
20+
target "artifact-all" {
21+
inherits = ["artifact"]
22+
platforms = [
23+
"linux/amd64",
24+
"linux/arm/v6",
25+
"linux/arm/v7",
26+
"linux/arm64",
27+
"linux/ppc64le",
28+
"linux/s390x"
29+
]
30+
}
31+
1532
target "image" {
1633
inherits = ["docker-metadata-action"]
1734
}

0 commit comments

Comments
 (0)