Skip to content

Passing Environment Variables to Reusable Workflow #26671

Discussion options

You must be logged in to vote
name: Project Specific Workflow
on:
  push:
    branches: [<which branches to run on>]
  pull_request:
    branches: [<which branches to run on>]
  workflow_dispatch:
    # Defaults here are for worflow_dispatch only, all other events are set in EnvSetup.setup-output-defaults:
    inputs:
      build-and-verify:
        description: 'Do a build and verify'
        required: true
        default: 'true'    
jobs:
  EnvSetup:
    name: Setup Dynamic Environment Variables
    runs-on: <your-awesome-runner>
    outputs:
      build-and-verify: ${{ steps.set-output-defaults.outputs.build-and-verify }}
    steps:
      - name: set outputs with default values
        id: set-output-defaults
    …

Replies: 18 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@azamfir
Comment options

@vitalykarasik
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@renny-oh
Comment options

Comment options

You must be logged in to vote
1 reply
@romikoops
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@paulogodinhoaq
Comment options

@mattdavis0351
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@oconstantin
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@stempler
Comment options

@RDhar
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback