Skip to content

job sdf by @gurevichdmitry #33

job sdf by @gurevichdmitry

job sdf by @gurevichdmitry #33

Workflow file for this run

name: test-flow
run-name: job ${{ github.event.inputs.deployment_name }} by @${{ github.actor }}
on:
# Ability to execute on demand
workflow_dispatch:
inputs:
deployment_name:
type: string
description: |
Name with letters, numbers, hyphens; start with a letter. Max 20 chars. e.g., 'my-env-123'
required: true
is_run:
type: boolean
default: false
description: "Run script or not"
jobs:
pass-job:
runs-on: ubuntu-20.04
steps:
- name: Pass job
id: message
run: |
python3 - <<EOF
import os
from urllib.parse import quote
multiline_string = quote("""
This is a multiline string
It spans multiple lines
Each line is a part of the string
""")
print(multiline_string)
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as fh:
print(f"MESSAGE={multiline_string}", file=fh)
EOF
- name: Fail job
if: ${{ inputs.is_run == true }}
run: echo "${{ steps.message.outputs.MESSAGE }}"