Skip to content

Commit

Permalink
Create edge-musl.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Mangani <lorenzo.mangani@gmail.com>
  • Loading branch information
lmangani authored Oct 7, 2023
1 parent 03212c9 commit 253882c
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/edge-musl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build & Release InfluxDB Edge musl

on:
workflow_dispatch:
release:
types: [created]
schedule:
# build nightly version
- cron: '30 5, * * *'

jobs:
build_iox_linux:
name: ubuntu-20.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Check out iox
uses: actions/checkout@v3
with:
repository: influxdata/influxdb
- run: |
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- run: sudo apt update && sudo apt install -y musl-tools
- name: Setup protoc
uses: arduino/setup-protoc@v1.2.0
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: x86_64-unknown-linux-musl
- name: Update
uses: actions-rs/cargo@v1
with:
command: update
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target x86_64-unknown-linux-musl --features aws,default
- name: Check Target
run: |
ls -alFh ./target/x86_64-unknown-linux-musl/release/influxdb_iox
ldd ./target/x86_64-unknown-linux-musl/release/influxdb_iox
- name: Compress iox
run: |
strip ./target/x86_64-unknown-linux-musl/release/influxdb_iox
upx ./target/x86_64-unknown-linux-musl/release/influxdb_iox
- name: Upload release
if: github.event_name != 'pull_request'
uses: boxpositron/upload-multiple-releases@1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_config: |
./target/x86_64-unknown-linux-musl/release/influxdb_iox
tag_name: ${{ env.VERSION }}
release_name: iox-musl_${{ env.VERSION }}
draft: false
prerelease: false
overwrite: true
- uses: actions/upload-artifact@v3
if: github.event_name != 'pull_request'
with:
name: edge-musl
path: ./target/x86_64-unknown-linux-musl/release/influxdb_iox

build_iox_docker:
if: github.event_name != 'pull_request'
needs: build_iox_linux
name: docker
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Check out iox
uses: actions/checkout@v3
- name: Log in to the GHCR registry
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker Build and push (server)
uses: docker/build-push-action@v4.0.0
with:
context: .
push: true
tags: |
ghcr.io/metrico/influxdb-edge-musl:latest

0 comments on commit 253882c

Please sign in to comment.