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]*'
env:
REPO_SLUG: "docker/buildx-bin"
BIN_REPO_SLUG: "docker/buildx-bin"
PKG_REPO_SLUG: "docker/buildx-pkg"
RELEASE_OUT: "./release-out"
jobs:
@ -71,7 +72,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
${{ env.REPO_SLUG }}
${{ env.BIN_REPO_SLUG }}
tags: |
type=ref,event=branch
type=ref,event=pr
@ -112,6 +113,18 @@ jobs:
uses: actions/checkout@v2
with:
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
uses: docker/setup-qemu-action@v1
@ -121,10 +134,22 @@ jobs:
with:
driver-opts: image=${{ env.REPO_SLUG_ORIGIN }}
-
name: Build packages
run: |
make pkg-cross
tree ./bin
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
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:
runs-on: ubuntu-latest

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

Loading…
Cancel
Save