-
Notifications
You must be signed in to change notification settings - Fork 0
cd-module: add option ref name #48
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
base: main
Are you sure you want to change the base?
Conversation
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.
Added suggestions to keep sha as an input for ci-hpc as well as making sure we fetch the correct config.
@iainrussell what do you think?
.github/workflows/cd-module.yml
Outdated
| owner_repo = "${{ github.repository }}" | ||
| owner, repo = owner_repo.split("/") | ||
| ref = "${{ github.sha }}" |
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.
This will make this step to fetch config from the branch that triggered the workflow run, ignoring ref_name input
.github/workflows/cd-module.yml
Outdated
| owner_repo = "${{ github.repository }}" | ||
| owner, repo = owner_repo.split("/") | ||
| ref = "${{ github.sha }}" |
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.
We might be able to go around this with implementing another step after the checkout step:
- name: Get checked out SHA
id: checked_out_sha
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
| ref = os.getenv("CHECKED_OUT_SHA") |
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.
not working, can you please check this is correct?
| setup: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.matrix.outputs.matrix }} |
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.
| matrix: ${{ steps.matrix.outputs.matrix }} | |
| checked_out_sha: ${{ steps.checked_out_sha.outputs.sha }} |
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.
References comment R128
@recmanj thanks, I appreciated your suggestions. our usage of do we expect using the I'm happy in either case but, the config from the triggering branch seems more sensible to me. the configs would be different in rare cases anyways. or at least, I'd prefer 2 jobs in a single config rather than differing configs in different branches. |
46aecdd to
bdfc636
Compare
Description
Contributor Declaration
By opening this pull request, I affirm the following: