Skip to content

chore: Refactor logpipeline and logparser validators and the resulted… #2

chore: Refactor logpipeline and logparser validators and the resulted…

chore: Refactor logpipeline and logparser validators and the resulted… #2

name: Telemetry Self Monitor Image Builder
on:
pull_request_target:
paths:
- "dependencies/telemetry-self-monitor/**"
types: [ opened, edited, synchronize, reopened, ready_for_review ]
push:
branches:
- main
paths:
- "dependencies/telemetry-self-monitor/**"
workflow_dispatch:
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 -- dependencies/telemetry-self-monitor/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 dependencies/telemetry-self-monitor/envs
echo BUILD_ARGS
} >> "$GITHUB_OUTPUT"
- name: load envs into output
id: load-envs
run: |
cat dependencies/telemetry-self-monitor/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.PROMETHEUS_VERSION }}-${{ steps.get-short-sha.outputs.short-sha }}" >> $GITHUB_OUTPUT
if: github.event_name == 'push'
build-image:

Check failure on line 58 in .github/workflows/build-telemetry-self-monitor-image.yml

View workflow run for this annotation

GitHub Actions / Telemetry Self Monitor Image Builder

Invalid workflow file

The workflow is not valid. .github/workflows/build-telemetry-self-monitor-image.yml (Line: 58, 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/telemetry-self-monitor
dockerfile: Dockerfile
context: dependencies/telemetry-self-monitor
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 }}"