Skip to content

bump fluent bit to 3.1.1 (#441) #1

bump fluent bit to 3.1.1 (#441)

bump fluent bit to 3.1.1 (#441) #1

name: Fluentbit Image Builder
on:
pull_request_target:
paths:
- "fluent-bit/**"
types: [ opened, edited, synchronize, reopened, ready_for_review ]
push:
branches:
- main
paths:
- "fluent-bit/**"
jobs:
envs:
runs-on: ubuntu-latest
outputs:
build-args: ${{ steps.prepare-envs.outputs.build-args }}
build-tag: ${{ steps.build-tag.outputs.build-tag || '' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Fetch new env file
run: |
git fetch origin ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }} --no-overlay -- fluent-bit/envs
if: github.event_name == 'pull_request_target'
- name: Prepare Envs
id: prepare-envs
run: |
{
# this creates a multiline string with the envs.
# Everything between `build-args<<BUILD_ARGS` and BUILD_ARGS will be content of the build-args variable.
echo 'build-args<<BUILD_ARGS'
cat fluent-bit/envs
echo BUILD_ARGS
} >> "$GITHUB_OUTPUT"
- name: load envs into output
id: load-envs
run: |
cat fluent-bit/envs >> "$GITHUB_OUTPUT"
- name: get commit short sha
id: get-short-sha
run: echo "short-sha=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT
- name: build image tag
id: build-tag
run: echo "build-tag=${{ steps.load-envs.outputs.FLB_VERSION }}-${{ steps.get-short-sha.outputs.short-sha }}" >> $GITHUB_OUTPUT
if: github.event_name == 'push'
build-image:

Check failure on line 57 in .github/workflows/build-fluentbit-image.yml

View workflow run for this annotation

GitHub Actions / Fluentbit Image Builder

Invalid workflow file

The workflow is not valid. .github/workflows/build-fluentbit-image.yml (Line: 57, Col: 3): Error calling workflow 'kyma-project/test-infra/.github/workflows/image-builder.yml@main'. The nested job 'build-image' is requesting 'id-token: write', but is only allowed 'id-token: none'.
needs: envs
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: tpi/fluent-bit
dockerfile: fluent-bit/Dockerfile
context: .
build-args: ${{ needs.envs.outputs.build-args }}
tags: ${{ needs.envs.outputs.build-tag }}
list-images:
needs: build-image
runs-on: ubuntu-latest
steps:
- name: List images
run: |
echo "${{ needs.build-image.outputs.images }}"