update build workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
5f1974ab8b
commit
ea65fe2ea4
3 changed files with 15 additions and 4 deletions
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
|
@ -30,8 +30,20 @@ jobs:
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
${{ env.DOCKERHUB_SLUG }}
|
${{ env.DOCKERHUB_SLUG }}
|
||||||
|
### versioning strategy
|
||||||
|
### push semver tag v3.2.1 on main (default branch)
|
||||||
|
# distribution/distribution:3.2.1
|
||||||
|
# distribution/distribution:3.2
|
||||||
|
# distribution/distribution:3
|
||||||
|
# distribution/distribution:latest
|
||||||
|
### push semver prelease tag v3.0.0-beta.1 on main (default branch)
|
||||||
|
# distribution/distribution:3.0.0-beta.1
|
||||||
|
### push on main
|
||||||
|
# distribution/distribution:edge
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
type=edge
|
type=edge
|
||||||
labels: |
|
labels: |
|
||||||
|
@ -81,5 +93,6 @@ jobs:
|
||||||
files: |
|
files: |
|
||||||
bin/*.tar.gz
|
bin/*.tar.gz
|
||||||
bin/*.zip
|
bin/*.zip
|
||||||
|
bin/*.sha256
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -31,11 +31,12 @@ RUN --mount=type=bind,target=/src,rw \
|
||||||
FROM scratch AS artifacts
|
FROM scratch AS artifacts
|
||||||
COPY --from=build /out/*.tar.gz /
|
COPY --from=build /out/*.tar.gz /
|
||||||
COPY --from=build /out/*.zip /
|
COPY --from=build /out/*.zip /
|
||||||
|
COPY --from=build /out/*.sha256 /
|
||||||
|
|
||||||
FROM scratch AS binary
|
FROM scratch AS binary
|
||||||
COPY --from=build /usr/local/bin/registry* /
|
COPY --from=build /usr/local/bin/registry* /
|
||||||
|
|
||||||
FROM alpine:3.14
|
FROM alpine:3.15
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml
|
COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml
|
||||||
COPY --from=build /usr/local/bin/registry /bin/registry
|
COPY --from=build /usr/local/bin/registry /bin/registry
|
||||||
|
|
|
@ -20,10 +20,7 @@ target "artifact" {
|
||||||
target "artifact-all" {
|
target "artifact-all" {
|
||||||
inherits = ["artifact"]
|
inherits = ["artifact"]
|
||||||
platforms = [
|
platforms = [
|
||||||
"darwin/amd64",
|
|
||||||
"darwin/arm64",
|
|
||||||
"linux/amd64",
|
"linux/amd64",
|
||||||
"linux/arm/v5",
|
|
||||||
"linux/arm/v6",
|
"linux/arm/v6",
|
||||||
"linux/arm/v7",
|
"linux/arm/v7",
|
||||||
"linux/arm64",
|
"linux/arm64",
|
||||||
|
|
Loading…
Reference in a new issue