Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.8] Release artifacts #3568

Merged
merged 1 commit into from Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -47,6 +47,22 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build artifacts
uses: docker/bake-action@v1
with:
targets: artifact-all
-
name: Move artifacts
run: |
mv ./bin/**/* ./bin/
-
name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: registry
path: ./bin/*
if-no-files-found: error
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
Expand All @@ -63,3 +79,15 @@ jobs:
${{ steps.meta.outputs.bake-file }}
targets: image-all
push: ${{ startsWith(github.ref, 'refs/tags/') }}
-
name: GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: |
bin/*.tar.gz
bin/*.zip
bin/*.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions Dockerfile
Expand Up @@ -28,6 +28,11 @@ RUN --mount=type=bind,rw \
--files="LICENSE" \
--files="README.md"

FROM scratch AS artifacts
COPY --from=build /out/*.tar.gz /
COPY --from=build /out/*.zip /
COPY --from=build /out/*.sha256 /
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also publish checksums (cc @milosgajdos @thaJeztah)


FROM scratch AS binary
COPY --from=build /usr/local/bin/registry* /

Expand Down
17 changes: 17 additions & 0 deletions docker-bake.hcl
Expand Up @@ -12,6 +12,23 @@ target "binary" {
output = ["./bin"]
}

target "artifact" {
target = "artifacts"
output = ["./bin"]
}

target "artifact-all" {
inherits = ["artifact"]
platforms = [
"linux/amd64",
"linux/arm/v6",
"linux/arm/v7",
"linux/arm64",
"linux/ppc64le",
"linux/s390x"
]
}

target "image" {
inherits = ["docker-metadata-action"]
}
Expand Down