Skip to content

Commit

Permalink
add job to get fluent-bit version from file
Browse files Browse the repository at this point in the history
Signed-off-by: juicer <[email protected]>
  • Loading branch information
cw-Guo committed Jan 3, 2025
1 parent 4a3ad09 commit b031e01
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build-fb-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Building Fluent Bit image

on:
workflow_dispatch:
inputs:
docker_tag_version:
description: 'Fluent Bit image release version'
required: true
default: '3.1.8'

env:
DOCKER_REPO: 'kubesphere'
Expand All @@ -18,6 +13,19 @@ permissions:
packages: write

jobs:
get-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Read fluent-bit version from file
id: get-version
run: |
VERSION=$(cat cmd/fluent-watcher/fluentbit/VERSION) # Read the version from the VERSION file
echo "version=${VERSION}" >> $GITHUB_ENV # Set the version as an environment variable
echo "::set-output name=version::${VERSION}" # Set the output for the step
determine-tags:
runs-on: ubuntu-latest
name: Determine image tags
Expand All @@ -29,7 +37,7 @@ jobs:
- name: Determine image version tag
id: determine-tags
run: |
VERSION=${{ github.event.inputs.docker_tag_version }}
VERSION=${{ steps.get-version.outputs.version }}
VERSION_WITHOUT_V=${VERSION#v}
MAJOR_MINOR=$(echo $VERSION_WITHOUT_V | cut -d. -f1-2)
Expand Down

0 comments on commit b031e01

Please sign in to comment.