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

Adds workflow to trigger the klotho docker image build workflow #4

Merged
merged 1 commit into from
Nov 23, 2022
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
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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to do anything with this output, right? Just showing it for debugging or whatever?