File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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'
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 }}
Original file line number Diff line number Diff 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+
3136FROM scratch AS binary
3237COPY --from=build /usr/local/bin/registry* /
3338
Original file line number Diff line number Diff 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+
1532target "image" {
1633 inherits = [" docker-metadata-action" ]
1734}
You can’t perform that action at this time.
0 commit comments