Skip to content

Conversation

@zvailanu98
Copy link
Owner

issues.
Your PR is merged!
Congratulations πŸŽ‰πŸŽ‰ The GitHub team thanks you ✨.

Once your PR is merged, your contributions will be publicly visible on the GitHub docs.

Now that you are part of the GitHub docs community, see how else you can contribute to the docs.

issues.
Your PR is merged!
Congratulations πŸŽ‰πŸŽ‰ The GitHub team thanks you ✨.

Once your PR is merged, your contributions will be publicly visible on the GitHub docs.

Now that you are part of the GitHub docs community, see how else you can contribute to the docs.
@zvailanu98 zvailanu98 added this to the Zoe milestone Aug 6, 2023
@zvailanu98 zvailanu98 self-assigned this Aug 6, 2023
@zvailanu98
Copy link
Owner Author

on:
workflow_dispatch:
env:

Setting an environment variable with the value of a configuration variable

env_var: ${{ vars.ENV_CONTEXT_VAR }}

jobs:
display-variables:
name: ${{ vars.JOB_NAME }}
# You can use configuration variables with the vars context for dynamic jobs
if: ${{ vars.USE_VARIABLES == 'true' }}
runs-on: ${{ vars.RUNNER }}
environment: ${{ vars.ENVIRONMENT_STAGE }}
steps:
- name: Use variables
run: |
echo "repository variable : $REPOSITORY_VAR"
echo "organization variable : $ORGANIZATION_VAR"
echo "overridden variable : $OVERRIDE_VAR"
echo "variable from shell environment : $env_var"
env:
REPOSITORY_VAR: ${{ vars.REPOSITORY_VAR }}
ORGANIZATION_VAR: ${{ vars.ORGANIZATION_VAR }}
OVERRIDE_VAR: ${{ vars.OVERRIDE_VAR }}

- name: ${{ vars.HELLO_WORLD_STEP }}
  if: ${{ vars.HELLO_WORLD_ENABLED == 'true' }}
  uses: actions/hello-world-javascript-action@main
  with:
    who-to-greet: ${{ vars.GREET_NAME }}

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