Skip to content

Commit

Permalink
test multi env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 29, 2023
1 parent ea20409 commit 8c46dbf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/scripts/python/handle_new_contributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,17 @@ def main():
"""Runs the scripts."""

with open(os.environ["GITHUB_ENV"], "a", encoding="utf-8") as github_env:
github_env.write("HELLO=WORLD!!")
github_env.write(
"\n".join(
[
f"{key}={value}"
for key, value in {
"HELLO": "WORLD",
"FOO": "POW",
}.items()
]
)
)

with open(os.environ["GITHUB_ENV"], "r", encoding="utf-8") as github_env:
print(github_env.read())
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/contributing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
# PR_URL: ${{ github.event.pull_request.url }}
# DOTDIGITAL_API_USER_AUTH: ${{ secrets.DOTDIGITAL_API_USER_AUTH }}

- name: Set Env Var
- name: Hello Env Var
run: echo ${{ env.HELLO }}

- name: Foo Env Var
run: echo ${{ env.FOO }}

0 comments on commit 8c46dbf

Please sign in to comment.