Skip to content

Trigger e2e job

Trigger e2e job #22

Workflow file for this run

name: Build Image
on:
push:
branches:
- main # This will get tagged with `latest` and `v{{DATE}}-{{COMMIT_HASH_SHORT}}`
workflow_call:
inputs:
tag:
description: 'Additional tag for built images'
required: false
type: string
default: ""
pull_request_target:
types: [ opened, edited, synchronize, reopened, ready_for_review ]
permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout
jobs:
compute-tag:
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.get_tag.outputs.tags }}
steps:
- name: Get the latest tag
id: get_tag
run: |
if [[ "${{ inputs.tag }}" != "" ]]; then
echo "tags=${{ inputs.tag }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "push" ]]; then
echo "tags=latest" >> $GITHUB_OUTPUT
else
{
echo 'tags<<TAGS'
echo 'PR-${{ github.event.pull_request.number }}'
echo '${{ github.event.pull_request.head.sha }}'
echo 'TAGS'
} >> "$GITHUB_OUTPUT"
fi
- name: Display output
run: echo ${{ steps.get_tag.outputs.tags }}
build-image:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: lifecycle-manager
dockerfile: Dockerfile
context: .
tags: ${{ needs.compute-tag.outputs.tags }}
test-image:
runs-on: ubuntu-latest
needs: build-image
steps:
- name: Test image
run: echo "Testing images ${{ needs.build-image.outputs.images }}"