Skip to content

Commit

Permalink
ci: publish packages to docker/buildx-pkg
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Mar 26, 2022
1 parent 6bdc628 commit 32de06b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ variable "PKG_PACKAGER" {
}

target "pkg" {
inherits = ["binaries"]
inherits = ["meta-helper", "binaries"]
args = {
PKG_TYPES = PKG_TYPES
PKG_APK_RELEASES = PKG_APK_RELEASES
Expand Down

0 comments on commit 32de06b

Please sign in to comment.