Skip to content

Commit

Permalink
feat: Add GitHub Action Workflow for Runtime Watcher Image Build (#361)
Browse files Browse the repository at this point in the history
* add github action workflow for building image on PR and main

* update build-image job name
  • Loading branch information
amritanshusikdar authored Sep 4, 2024
1 parent 4955f5d commit d9e0809
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-runtime-watcher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build-runtime-watcher

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
- 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: runtime-watcher
dockerfile: ./runtime-watcher/Dockerfile
context: .
tags: ${{ needs.compute-tag.outputs.tag }}

0 comments on commit d9e0809

Please sign in to comment.