Skip to content

Build & Release InfluxDB Edge musl #444

Build & Release InfluxDB Edge musl

Build & Release InfluxDB Edge musl #444

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/[email protected]
- 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/influxdb3
ldd ./target/x86_64-unknown-linux-musl/release/influxdb3
- name: Compress iox
run: |
strip ./target/x86_64-unknown-linux-musl/release/influxdb3
upx ./target/x86_64-unknown-linux-musl/release/influxdb3
- name: Upload release
if: github.event_name != 'pull_request'
uses: boxpositron/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_config: |
./target/x86_64-unknown-linux-musl/release/influxdb3
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: influxdb3
path: ./target/x86_64-unknown-linux-musl/release/influxdb3
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/[email protected]
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/[email protected]
with:
context: .
push: true
tags: |
ghcr.io/metrico/influxdb-edge-musl:latest