Skip to content

CI

CI #26

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [ master ]
create:
tags:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
beat:
strategy:
matrix:
arch: [armv6, armv7]
beat: [filebeat, metricbeat, packetbeat, heartbeat]
distro: [buster]
go: [1.17.5]
runs-on: ubuntu-latest
name: ${{ matrix.beat }} ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
- name: Set tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- uses: uraimo/run-on-arch-action@v2.1.1
name: Build beat (on arch)
id: build-beat
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
install: |
apt-get update -q -y
apt-get install -q -y wget jq curl git build-essential libsystemd-dev
run: |
./install-go.sh ${{ matrix.go }} armv6l
./build.sh ${{ matrix.beat }} ${{ steps.vars.outputs.tag }}
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.beat }}-${{ matrix.arch }}-${{ matrix.distro }}
path: ${{ matrix.beat }}-*.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.beat }}-*.tar.gz