-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from klothoplatform/update-docker-image-workflow
Adds workflow to trigger the klotho docker image build workflow
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
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); | ||
|