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

e2e github actions #6303

Open
wants to merge 31 commits into
base: cloud-e2e-setup-services
Choose a base branch
from
Open

e2e github actions #6303

wants to merge 31 commits into from

Conversation

himadrisingh
Copy link
Contributor

No description provided.

@himadrisingh himadrisingh self-assigned this Dec 18, 2024
Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

Nice! Functionality looks good. Just looks like there's one spot where the code could be simpler.

Comment on lines +50 to +58
run: |
echo "matrix=$(jq -n '[
"web-admin" | select(env.FILTER_ADMIN == "true" or env.FILTER_COMMON == "true"),
"web-local" | select(env.FILTER_LOCAL == "true" or env.FILTER_COMMON == "true")
]' | jq -c)" >> "$GITHUB_OUTPUT"
env:
FILTER_ADMIN: ${{ steps.filter.outputs.admin }}
FILTER_COMMON: ${{ steps.filter.outputs.common }}
FILTER_LOCAL: ${{ steps.filter.outputs.local }}
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels like these environment variables are adding an extra layer of indirection. Could we use filter.outputs directly in the jq command like: select(${{ steps.filter.outputs.admin }} == "true" or ${{ steps.filter.outputs.common }} == "true")?

Copy link
Contributor

Choose a reason for hiding this comment

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

Further, can we treat the filter output like a typical boolean, not a string, like:
select(${{ steps.filter.outputs.admin }} or ${{ steps.filter.outputs.common }})
or even without the select function:
if ${{ steps.filter.outputs.admin }} or ${{ steps.filter.outputs.common }} then "web-admin" else empty end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it doesn't have access to steps.filter.outputs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure? This example seems to show it's possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants