diff --git a/.github/workflows/buildx-package.yml b/.github/workflows/buildx-package.yml new file mode 100644 index 000000000000..783438e36b74 --- /dev/null +++ b/.github/workflows/buildx-package.yml @@ -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/* diff --git a/buildkit-overlaybd.service b/buildkit-overlaybd.service new file mode 100644 index 000000000000..eb219f53cb78 --- /dev/null +++ b/buildkit-overlaybd.service @@ -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 diff --git a/dadi-gen b/dadi-gen new file mode 100755 index 000000000000..4db497629013 Binary files /dev/null and b/dadi-gen differ diff --git a/nfpm.yaml b/nfpm.yaml new file mode 100644 index 000000000000..19be48cbbc2a --- /dev/null +++ b/nfpm.yaml @@ -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: \ No newline at end of file