Skip to content

Commit

Permalink
package for acr
Browse files Browse the repository at this point in the history
Signed-off-by: liulanzheng <[email protected]>
  • Loading branch information
liulanzheng committed Oct 23, 2024
1 parent 1e5ed2f commit d956ab7
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/buildx-package.yml
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/*
22 changes: 22 additions & 0 deletions buildkit-overlaybd.service
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
Binary file added dadi-gen
Binary file not shown.
31 changes: 31 additions & 0 deletions nfpm.yaml
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:

0 comments on commit d956ab7

Please sign in to comment.