-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Build submodule package by branch #4121
Conversation
.github/workflows/test.yml
Outdated
name: Checkout main on all submodules | ||
run: | | ||
git submodule foreach git checkout main | ||
git submodule foreach git pull origin main |
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.
Should we create a dedicated action to checkout with the submodules for all the workflows? Or will just be needed for the E2E enterprise tests? I feel like we might need to check it out for all of them but might miss any nuance that is not needed all the time.
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.
for not i am only testing here, and yes we will need it in couple of places
…test-ref-submodule-branch
submodule_branch: | ||
description: 'Submodule branch to checkout to' | ||
required: false | ||
default: 'main' |
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 could not create
submodule_branch
as required becausesubmodules
is not required. - i added submodule_branch default as a guard but it should not be used IMO.
# checkout without submodules | ||
- uses: actions/checkout@v3 | ||
if: steps.setup.outputs.has_token != 'true' | ||
run: ${{ steps.setup.outputs.has_token == 'true' }} |
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 sure why we use has_token
if we have here input.submodule
.github/workflows/prod-deploy-ws.yml
Outdated
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 added it because it was missing, Does anyone know if there were any reason for it?
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 added it because it was missing, Does anyone know if there were any reason for it?
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 that i'm aware of
@@ -26,6 +26,7 @@ jobs: | |||
with: | |||
ee: ${{ contains (matrix.name,'ee') }} | |||
submodules: ${{ contains (matrix.name,'ee') }} | |||
submodule_branch: "next" |
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.
Should we maybe use the current
branch here in case we do a dev deploy from a branch in the future?
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.
It makes sense here i will look into it.
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.
Now what i thought about it i am not sure, couple you provide a use case for such a case?
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 that i'm aware of
submodules: true | ||
token: ${{ secrets.SUBMODULES_TOKEN }} | ||
submodule_token: ${{ secrets.SUBMODULES_TOKEN }} | ||
submodule_branch: "next" |
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.
Should we try using the current branch here aswell?
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.
For the test i am not sure, because the name should be the exact name as in the enterprise repo which could be hard to maintain, and in addition It will break in the following case, if we have one PR in main repo and multiply branches in the enterprise repo (due the possible complexity)
What change does this PR introduce?
Why was this change needed?
Other information (Screenshots)