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

github/workflows/nix: do not set env var with another env var #568

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

tchaikov
Copy link
Contributor

this change addresses a regression introduced by 9249491.

in 9249491, we tried to set $SCYLLA_VERSION with env.RELOC_VERSION, but github action does not allow this. because the env variables in github's workflow YAML are expanded when the YAML file is parsed. so SCYLLA_VERSION is never expanded with the value of RELOC_VERSION.

so, in this change, to avoid the repeatings, we use environmental file to store SCYLLA_VERSION, so that it can be picked by the steps that consume this env var.

see also https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files

this change addresses a regression introduced by 9249491.

in 9249491, we tried to set `$SCYLLA_VERSION` with `env.RELOC_VERSION`,
but github action does not allow this. because the env variables in
github's workflow YAML are expanded when the YAML file is parsed. so
`SCYLLA_VERSION` is never expanded with the value of `RELOC_VERSION`.

so, in this change, to avoid the repeatings, we use environmental
file to store `SCYLLA_VERSION`, so that it can be picked by the
steps that consume this env var.

see also https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
Copy link
Contributor

@fruch fruch left a comment

Choose a reason for hiding this comment

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

LGTM

@fruch fruch merged commit 22283e1 into scylladb:next Mar 25, 2024
4 checks passed
@tchaikov tchaikov deleted the github-workflow-nix-env-var branch March 25, 2024 09:09
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