title: How to run a gitlab job except a variable has some value?
body: <p>I want to run a gitlab job in every case EXCEPT the variable <code>RUN</code> is defined and contains the value <code>run3</code>.</p>
  <p>So again:</p>
  <ul>
  <li>variable <code>RUN</code> is undefined: run the job</li>
  <li>variable <code>RUN</code> is defined and does not contain the value <code>run3</code>: run the job</li>
  <li>variable <code>RUN</code> is defined and does contain the value <code>run3</code>: DO NOT run the job</li>
  </ul>
  <p>I tried the following rules:</p>
  <pre><code>  rules:
      - if: $RUN != null &amp;&amp; $RUN == &quot;run3&quot;
        when: never
  
    rules:
      - if: $RUN != &quot;&quot; &amp;&amp; $RUN == &quot;run3&quot;
        when: never
  
    rules:
      - if: $RUN == &quot;run3&quot;
        when: never 
  </code></pre>
  <p>Without the variable <code>RUN</code> being defined, no job was run. I expected the job to have been run.</p>
  <p>How to fix it? Where is the problem in the logic?</p>