forked from moby/buildkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: liulanzheng <[email protected]>
- Loading branch information
1 parent
1e5ed2f
commit d956ab7
Showing
4 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: buildx-package | ||
|
||
on: | ||
push: | ||
branches: | ||
- 202312-acr | ||
|
||
env: | ||
SETUP_BUILDX_VERSION: "latest" | ||
REPO_SLUG_TARGET: "moby/buildkit" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
version: ${{ env.SETUP_BUILDX_VERSION }} | ||
buildkitd-flags: --debug | ||
use: true | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 100 | ||
- | ||
name: Create | ||
run: | | ||
make binaries | ||
ls -l bin/build/ | ||
- | ||
name: Package | ||
run: | | ||
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | ||
sudo apt update | ||
sudo apt install -y nfpm | ||
mkdir -p release_package | ||
nfpm pkg --packager rpm --target release_package/ | ||
ls -l release_package/ | ||
- | ||
name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: releases | ||
path: release_package/* | ||
|
||
acr-release: | ||
name: ACR Release | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- name: Download builds and release notes | ||
uses: actions/download-artifact@v4 | ||
- name: Display downloaded files | ||
shell: bash | ||
run: ls -l releases/* | ||
- name: Create Release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "ACR Release" | ||
files: | | ||
releases/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[Unit] | ||
Description=buildkit-overlaybd service | ||
After=network.target local-fs.target | ||
Before=shutdown.target | ||
DefaultDependencies=no | ||
Conflicts=shutdown.target | ||
|
||
[Service] | ||
LimitNOFILE=1048576 | ||
LimitCORE=infinity | ||
Type=simple | ||
ExecStartPre=modprobe overlay | ||
ExecStart=/usr/bin/buildkitd --oci-worker-snapshotter=overlaybd --oci-worker-proxy-snapshotter-path=/run/overlaybd-snapshotter/overlaybd.sock | ||
|
||
GuessMainPID=no | ||
Restart=always | ||
RestartSec=1s | ||
KillMode=process | ||
OOMScoreAdjust=-999 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# nfpm example config file | ||
# | ||
# check https://nfpm.goreleaser.com/configuration for detailed usage | ||
# | ||
name: "buildkit-overlaybd" | ||
arch: amd64 | ||
platform: linux | ||
version: 0.1.0 | ||
release: 1 | ||
section: "default" | ||
priority: "extra" | ||
|
||
maintainer: "overlaybd authors" | ||
description: | | ||
Buildkit for Overlaybd | ||
vendor: "overlaybd" | ||
homepage: "https://github.com/data-accelerator/buildkit" | ||
license: "Apache-2.0" | ||
contents: | ||
- src: ./bin/build/* | ||
dst: /usr/bin/ | ||
- src: ./dadi-gen | ||
dst: /usr/bin/dadi-gen | ||
- src: ./buildkit-overlaybd.service | ||
dst: /opt/overlaybd/buildkit-overlaybd.service | ||
type: config | ||
overrides: | ||
rpm: | ||
scripts: | ||
deb: | ||
scripts: |