Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add GitHub Action for template-operator Image Build #243

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/pull-build-template-operator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: pull-build-template-operator

on:
push:
branches:
- main # This will get tagged with `latest` and `v{{DATE}}-{{COMMIT_HASH_SHORT}}`
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:
tag: ${{ steps.get_tag.outputs.TAG }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the latest tag
id: get_tag
if: github.event_name == 'push'
run: echo "tag=latest" >> $GITHUB_OUTPUT
amritanshusikdar marked this conversation as resolved.
Show resolved Hide resolved
- name: Echo the tag
run: echo ${{ steps.get_tag.outputs.TAG }}
build-image:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: template-operator
dockerfile: Dockerfile
context: .
tags: ${{ needs.compute-tag.outputs.tag }}
Loading