build rpm #2
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
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 | |
apt update | |
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/*/* |