title: switch environment variable in github actions
body: <p>I use github actions for integration tests.</p>
  
  <p>The problem is, that the tests should not run on multiple instances with the <strong>same configuration in parallel</strong> (the test would fail).</p>
  
  <p>But, it can be run once with let's say configuration 1 and once with configuration 2 in parallel.</p>
  
  <p>As <a href="https://github.community/t5/GitHub-Actions/Prevent-parallel-workflows/td-p/32889" rel="noreferrer">this blog post</a> describes, it is not possible to secure that a workflow does not run in parallel.</p>
  
  <p>Is there any way to switch configurations, that configuration 1 and configuration 2 alternately?</p>
  
  <p>In that case, it would not be that likely that the workflow workflows with the same configuration runs in parallel (I could add more configurations if needed).</p>
  
  <p>For example, this could be done by a <strong>global and writable</strong> (for the workflow) variable that is alternately 1 or 2 and the workflow picks that configuration.</p>
  
  <p>Example workflow(the secret <code>confToSwitch</code> should be switched):</p>
  
  <pre><code>name: test
  on: [push]
  jobs:
    test:
      runs-on: ubuntu-latest
      steps:
      - uses: actions/checkout@v1
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: "load configuration"
        run: echo "configuration=$conf" &gt;&gt; ./conf
        env:
          conf: ${{ secrets.confToSwitch }}
      - name: "integration tests"
        run: "mvn -B integration-test"
  </code></pre>