Skip to content

Build & Release InfluxDB Edge musl #38

Build & Release InfluxDB Edge musl

Build & Release InfluxDB Edge musl #38

Workflow file for this run

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: influxdb_iox
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