-
Notifications
You must be signed in to change notification settings - Fork 0
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
move create-clusters workflow from test-gh-actions #17
Conversation
There is a danger of clashing names: https://github.com/stackrox/actions/tree/main/infra/create-cluster Are you planning to use #16 for this later? |
No, rewriting the workflow into an action that references other actions through scripts should not be desirable because:
|
.github/workflows/create-cluster.yml
Outdated
image: [main, scanner, scanner-db, collector] | ||
steps: | ||
- name: Wait for the ${{matrix.image}} image | ||
uses: stackrox/actions/release/wait-for-image@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% convinced with hardcoding the reference for the action.
Here is what did not work:
- checking out the repository and using a local action, which would need to pass the workflow ref from the calling workflow to here. For unknown reasons the action behaves differently when called locally or as shell script vs as a remote action, and the
gh_log
output becomes part of the block output here, which causes jq and the loop to fail. - using an input (or other) variable in the path, e.g.
stackrox/actions/release/wait-for-image@${{ inputs.workflow-ref }}
The other actions in this workflow are not affected by the output bug.
If we remove the gh_log
output from the block wait-for-image
, we could use the checkout and local action approach (with passing the workflow ref from the calling workflow).
(there is no context that can provide the ref of the called workflow at the moment, hence the suggestion to have an explicit input: actions/toolkit#1264)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other actions in this workflow are not affected by the output bug.
If we remove the gh_log output from the block wait-for-image, we could use the checkout and local action approach (with passing the workflow ref from the calling workflow).
fixed in #18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vikin91 and I agreed offline to pass the workflow-ref
to checkout the actions
repo and run a local action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a coarse review, but the moving looks good! Now we have one place to add improvements (I can spot some of them already).
FYI: @JoukoVirtanen
Moving the create-clusters workflow from test-gh-actions: https://github.com/stackrox/test-gh-actions/blob/main/.github/workflows/create-clusters.yml.
In contrast to #16, this PR does add the workflow as is and does not attempt to rewrite it into an action.
Both are reusable by other workflows, example: https://github.com/stackrox/test-gh-actions/pull/114/files .
Example build: https://github.com/stackrox/test-gh-actions/actions/runs/5820630385