ci: publish packages to docker/buildx-pkg

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
pull/840/head
CrazyMax 4 years ago
parent 6abf1a05bd
commit 649417b555
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -14,7 +14,8 @@ on:
- 'v[0-9]*' - 'v[0-9]*'
env: env:
REPO_SLUG: "docker/buildx-bin" BIN_REPO_SLUG: "docker/buildx-bin"
PKG_REPO_SLUG: "docker/buildx-pkg"
RELEASE_OUT: "./release-out" RELEASE_OUT: "./release-out"
jobs: jobs:
@ -71,7 +72,7 @@ jobs:
uses: docker/metadata-action@v3 uses: docker/metadata-action@v3
with: with:
images: | images: |
${{ env.REPO_SLUG }} ${{ env.BIN_REPO_SLUG }}
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
@ -112,6 +113,18 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ env.PKG_REPO_SLUG }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
bake-target: meta-helper
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
@ -121,10 +134,22 @@ jobs:
with: with:
driver-opts: image=${{ env.REPO_SLUG_ORIGIN }} driver-opts: image=${{ env.REPO_SLUG_ORIGIN }}
- -
name: Build packages name: Login to DockerHub
run: | if: github.event_name != 'pull_request'
make pkg-cross uses: docker/login-action@v1
tree ./bin with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push image
uses: docker/bake-action@v1
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: pkg-cross
set: |
*.output=type=image,push=${{ github.event_name != 'pull_request' }}
buildkit-edge: buildkit-edge:
runs-on: ubuntu-latest runs-on: ubuntu-latest

@ -180,7 +180,7 @@ variable "PKG_PACKAGER" {
# PKG_TYPES=deb PKG_DEB_RELEASES=debian11 docker buildx bake pkg # PKG_TYPES=deb PKG_DEB_RELEASES=debian11 docker buildx bake pkg
# docker buildx bake --set *.platform=windows/amd64 --set *.output=./bin pkg # docker buildx bake --set *.platform=windows/amd64 --set *.output=./bin pkg
target "pkg" { target "pkg" {
inherits = ["binaries"] inherits = ["meta-helper", "binaries"]
args = { args = {
PKG_TYPES = PKG_TYPES PKG_TYPES = PKG_TYPES
PKG_APK_RELEASES = PKG_APK_RELEASES PKG_APK_RELEASES = PKG_APK_RELEASES

Loading…
Cancel
Save