mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
.github/workflows/release.yml: build musl linked binaries.
This commit is contained in:
parent
2d6d4e84ff
commit
9a6119ca93
1 changed files with 56 additions and 1 deletions
57
.github/workflows/release.yml
vendored
57
.github/workflows/release.yml
vendored
|
|
@ -59,6 +59,61 @@ jobs:
|
|||
asset_path: build/bundle.tar.gz
|
||||
asset_content_type: application/tar+gzip
|
||||
|
||||
# Build thalos binaries that are linked with musl libc.
|
||||
musl:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [ 386, amd64, arm, arm64 ]
|
||||
runs-on: ubuntu-latest
|
||||
name: Build musl (${{ matrix.arch }})
|
||||
container:
|
||||
image: golang:1.21-alpine3.19
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: install dependencies
|
||||
run: apk add make
|
||||
|
||||
- name: compile
|
||||
id: compile
|
||||
run: |
|
||||
mkdir -p build/bundle/{bin,logs}
|
||||
GOARCH=${{matrix.arch}} make -e DESTDIR=build/bundle PREFIX= CFGDIR= install install-scripts
|
||||
tar -C build/bundle -z -cf build/bundle.tar.gz .
|
||||
echo "version=$(sed -n 's/.*PROGRAM_VERSION\s*=\s*//p' Makefile)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload thalos-server
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_name: thalos-server-${{steps.compile.outputs.version}}-linux-${{matrix.arch}}-musl
|
||||
asset_path: build/thalos-server
|
||||
asset_content_type: application/octal-stream
|
||||
|
||||
- name: Upload thalos-tools
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_name: thalos-tools-${{steps.compile.outputs.version}}-linux-${{matrix.arch}}-musl
|
||||
asset_path: build/thalos-tools
|
||||
asset_content_type: application/octal-stream
|
||||
|
||||
- name: Upload bundle
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_name: thalos-${{steps.compile.outputs.version}}-linux-${{matrix.arch}}-musl.tar.gz
|
||||
asset_path: build/bundle.tar.gz
|
||||
asset_content_type: application/tar+gzip
|
||||
|
||||
|
||||
package-ubuntu:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -121,4 +176,4 @@ jobs:
|
|||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_name: ${{ steps.package.outputs.info_name }}
|
||||
asset_path: ${{ steps.package.outputs.info_filename }}
|
||||
asset_content_type: text/plain
|
||||
asset_content_type: text/plain
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue