Skip to content

Commit

Permalink
Merge pull request #4 from klothoplatform/update-docker-image-workflow
Browse files Browse the repository at this point in the history
Adds workflow to trigger the klotho docker image build workflow
  • Loading branch information
DavidSeptimus-Klotho authored Nov 23, 2022
2 parents 1392831 + f6ef8d2 commit ccf06b6
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/update_docker_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Trigger Docker Image Build Workflow

on:
release:
types:
- published
workflow_dispatch:
inputs:
klotho-release-ref:
description: 'the klotho release tag ref to use in the Docker image (e.g refs/tags/v1.0.0)'
required: true

jobs:
update-docker-image:
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.KLOTHOPLATFORM_GH_ACTIONS_TOKEN }}
script: |
const result = await github.rest.actions.createWorkflowDispatch({
owner: 'klothoplatform',
repo: 'docker-klotho',
workflow_id: 'build-image.yaml',
ref: 'refs/heads/main',
inputs: {
"klotho-version": "${{ github.ref_name || github.event.inputs.klotho-release-ref }}".split("/")[2] // (e.g. v1.0.0)
}
});
console.log(result);

0 comments on commit ccf06b6

Please sign in to comment.