diff --git a/.github/workflows/05-conditionals.yml b/.github/workflows/05-conditionals.yml index cad4eec..e3510fa 100644 --- a/.github/workflows/05-conditionals.yml +++ b/.github/workflows/05-conditionals.yml @@ -20,30 +20,19 @@ env: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - hello: + greeting: # The type of runner that the job will run on runs-on: ubuntu-latest - if: ${{ env.Greeting == 'Hello'}} # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs a single command using the runners shell - - name: Run a one-line script + - name: Run Hello run: echo "$Greeting, $Name!" + if: ${{ env.Greeting == 'Hello'}} - bye: - # The type of runner that the job will run on - runs-on: ubuntu-latest - if: ${{ env.Greeting == 'Goodbye'}} - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo "$Greeting, $Name!" + - name: Run Goodbye + run: echo "$Greeting $Name" + if: ${{ env.Greeting == 'Goodbye'}}