Skip to content

Commit

Permalink
new_environment_variables
Browse files Browse the repository at this point in the history
```yaml
    steps:
      - run: env  # Should not include environment_variables $A, $B, and $C
      - shell: python
        run: |
          new_environment_variables = """\
          A=Algol
          B=Basic
          C=C++
          """
          import os
          with open(os.getenv(new_environment_variables), "a") as github_output:
              github_output.write("x")
      - run: env  # Should include environment_variables $A, $B, and $C
```
  • Loading branch information
cclauss authored Oct 14, 2024
1 parent 2b00294 commit ba07528
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/itinerant_ruff_fixes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ jobs:
dump_contexts_to_log:
runs-on: ubuntu-24.04
steps:
- run: env # Should not include environment_variables $A, $B, and $C
- shell: python
run: |
new_environment_variables = """\
A=Algol
B=Basic
C=C++
"""
import os
with open(os.getenv(new_environment_variables), "a") as github_output:
github_output.write("x")
- run: env # Should include environment_variables $A, $B, and $C
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
Expand Down

0 comments on commit ba07528

Please sign in to comment.