Skip to content

feat: sepate tag/master builds #37

feat: sepate tag/master builds

feat: sepate tag/master builds #37

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

Check failure on line 40 in .github/workflows/beats.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/beats.yml (Line: 40, Col: 13): The identifier 'build-beat' may not be used more than once within the same scope.
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