Skip to content

feat: fix the mess with tag/branch #40

feat: fix the mess with tag/branch

feat: fix the mess with tag/branch #40

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: [armv7]
beat: [filebeat, metricbeat, heartbeat]
runs-on: ubuntu-latest
container:
image: golang:1.20.11
name: ${{ matrix.beat }} ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
- name: Build beat (tag)
id: build-beat
if: "startsWith(github.ref, 'refs/tags/')"
run: ./build.sh ${{ matrix.beat }} ${{ matrix.arch }}
- name: Build beat (master)
id: build-beat-master
if: "!startsWith(github.ref, 'refs/tags/')"
run: ./build.sh ${{ matrix.beat }} ${{ matrix.arch }} master
- uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: ${{ matrix.beat }}-${{ matrix.arch }}
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