github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/github/testdata/examples/if.yaml.golden (about)

     1  kind: pipeline
     2  spec:
     3    stages:
     4    - name: build
     5      spec:
     6        clone: {}
     7        envs:
     8          NODE_ENV: production
     9        platform:
    10          arch: amd64
    11          os: linux
    12        runtime:
    13          spec: {}
    14          type: cloud
    15        steps:
    16        - name: Setup Node.js
    17          spec:
    18            uses: actions/setup-node@v2
    19            with:
    20              node-version: 14.x
    21          type: action
    22        - name: Install dependencies
    23          spec:
    24            run: npm ci
    25          type: script
    26        - name: Build
    27          spec:
    28            run: npm run build
    29          type: script
    30        - name: Run tests
    31          spec:
    32            run: npm test
    33          type: script
    34      type: ci
    35      when: '!~ github.event.head_commit.message, ''skip ci'')'
    36    - name: deploy
    37      spec:
    38        clone: {}
    39        envs:
    40          NODE_ENV: production
    41        platform:
    42          arch: amd64
    43          os: linux
    44        runtime:
    45          spec: {}
    46          type: cloud
    47        steps:
    48        - name: Deploy
    49          spec:
    50            run: |
    51              echo "Deploying to production server"
    52          type: script
    53      type: ci
    54      when: <+trigger.event> == 'push' && <+trigger.payload.ref> == 'refs/heads/main'
    55        && !~ github.event.head_commit.message, 'skip deploy')
    56  version: 1