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 3b67bb7
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 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,7 +13,24 @@ permissions:
packages: write

jobs:
get-version:
runs-on: ubuntu-latest
name: get fluent-bit version
outputs:
VERSION: ${{ steps.get-version.outputs.VERSION }}
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_OUTPUT
determine-tags:
needs:
- get-version
runs-on: ubuntu-latest
name: Determine image tags
outputs:
Expand All @@ -29,7 +41,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 3b67bb7

Please sign in to comment.