Trigger e2e job #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 }}" |