title: How to reference 'environment' in github action workflow?
body: <p>I have the environment created named &quot;main&quot;, but the workflow below errors out:
  environment created:
  <a href="https://i.stack.imgur.com/Df9FA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Df9FA.png" alt="enter image description here" /></a></p>
  <p>Below is my github workflow:</p>
  <pre><code>name: Deploy ADf ARM    
  
  on:
    workflow_dispatch:
  
  environment: 
    name: main
  
  jobs:
    build-and-deploy:
      runs-on: ubuntu-latest
      steps:
  
        # Checkout code
      - uses: actions/checkout@main
        ...
  </code></pre>
  <p>at present it notes the error:</p>
  <pre><code>The workflow is not valid. .github/workflows/deploy-adf-arm.yml (Line: 7, Col: 1): Unexpected value 'environment'
  </code></pre>
  <p>How can I reference this environment to work?</p>