Skip to content

v0.195.2

v0.195.2 #119

Workflow file for this run

name: Build-n-Release
on:
release:
types: [created]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/[email protected]
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Cache Flux Build
id: cacheflux
uses: actions/[email protected]
with:
path: |
flux
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-fluxpipe-${{ hashFiles('**/fluxpipe-server.go') }}
- name: Cache Status
run: |
echo ${{steps.cacheflux.outputs.cache-hit}}
- name: Get Flux
if: steps.cacheflux.outputs.cache-hit != 'true'
uses: GuillaumeFalourd/clone-github-repo-action@v2
with:
owner: 'InfluxCommunity'
repository: 'flux'
- name: Compile Flux
if: steps.cacheflux.outputs.cache-hit != 'true'
run: |
cd flux
git checkout tags/v0.194.3
go mod tidy
go get ./...
make
- name: Build Fluxpipe
run: |
sed -i 's:/usr/src:'`pwd`':' flux.pc
./build.sh
- name: Compress Fluxpipe
run: |
strip fluxpipe-server
strip fluxpipe-lambda
strip fluxpipelib.a
upx fluxpipe-server
- name: Get Timestamp
if: github.event_name != 'pull_request'
id: time
uses: nanzm/[email protected]
with:
timeZone: 0
format: 'YYYYMMDDHHmmss'
- run: |
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
echo "TIME=${{ steps.time.outputs.time }}" >> $GITHUB_ENV
- name: Upload release
if: github.event_name != 'pull_request'
uses: boxpositron/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_config: |
fluxpipe-server
fluxpipe-lambda
fluxpipelib.a
tag_name: ${{ env.VERSION }}
release_name: fluxpipe_${{ env.VERSION }}
draft: false
prerelease: false
overwrite: true
- name: Log in to the Container registry
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build and push (server)
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
context: .
push: true
tags: |
ghcr.io/metrico/fluxpipe:latest
ghcr.io/metrico/fluxpipe:${{ env.VERSION }}
- name: Docker Build and push (lambda)
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
context: .
file: Dockerfile.lambda
push: true
tags: |
ghcr.io/metrico/fluxpipe-lambda:latest
ghcr.io/metrico/fluxpipe-lambda:${{ env.VERSION }}