-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.47 KB
/
test-flow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Test Job
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:
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Azure CLI script
uses: azure/cli@v2
with:
azcliversion: latest
inlineScript: |
az account show
# - name: Fail job
# run: exit 1
# - 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 }}"