我一直在尝试在 GitHub Actions 中为作业创造条件,但似乎无法让它发挥作用
我有以下输入:
on:
workflow_dispatch:
inputs:
env:
description: 'Select the Environment'
type: choice
required: true
options:
- SIT
- UAT
op:
description: 'Deploy or Delete Apps'
type: choice
required: true
options:
- Deploy
- Delete
ver:
description: 'Type the app version'
required: true
Run Code Online (Sandbox Code Playgroud)
以及以下职位:
jobs:
create-sit-app:
runs-on: ubuntu-latest
name: 'Deploy App for SIT'
if: |
(${{ github.event.inputs.env }} == 'SIT' && ${{ github.event.inputs.op }} == 'Deploy')
steps:
........
........
........
Run Code Online (Sandbox Code Playgroud)
我也尝试过这个
(${{ github.event.inputs.env == 'SIT' }} && ${{ …Run Code Online (Sandbox Code Playgroud)