Skip to content

Commit

Permalink
Actions update
Browse files Browse the repository at this point in the history
  • Loading branch information
artyom-p committed Dec 1, 2023
1 parent 1c28f87 commit 828549f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
6 changes: 5 additions & 1 deletion actions/add-notification-step/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
required: true
type: string
description: Message state
mention:
required: false
type: boolean
description: Whether to mention user or not
outputs:
state:
value: ${{ steps.template.outputs.state }}
Expand All @@ -35,7 +39,7 @@ runs:
MARKDOWN=$(jq '.phases | map(.) | join("\n")' <<< $STATE)
echo $MARKDOWN
TEMPLATE=$(cat "${{ inputs.template_path }}")
TEMPLATE=$(jq ".blocks[4].text.text = $MARKDOWN" <<< $TEMPLATE)
TEMPLATE=$(jq ".blocks[4].text.text = $MARKDOWN" <<< $TEMPLATE)
echo $TEMPLATE
echo $TEMPLATE > ${{ inputs.template_path }}
BASE64="$(echo $STATE | base64 -w 0)"
Expand Down
2 changes: 1 addition & 1 deletion actions/build-notification-template/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ runs:
PATH=$(readlink -f $STORE_IN_FILE)
echo "file=$PATH" >> $GITHUB_OUTPUT
-
name: Create build phases templatle file
name: Create build phases template file
id: phases
shell: bash
run: |
Expand Down
21 changes: 19 additions & 2 deletions actions/read-config-file/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,28 @@ runs:
echo ':computer: ${{ github.ref }}' >> $GITHUB_STEP_SUMMARY
echo ':link: ${{ github.sha }}' >> $GITHUB_STEP_SUMMARY
-
name: Read JSON config
name: Download config yaml
id: yaml
shell: bash
run: |
URL=$(echo "https://${{ inputs.gh_token }}@raw.githubusercontent.com/Geta/gks-tenant-gcc/main/.github/configs/${{ inputs.file }}")
FILE_PATH=$(echo "./config.yaml")
curl -L $URL > $FILE_PATH
echo "file=$FILE_PATH" >> $GITHUB_OUTPUT
-
name: Convert YAML to JSON
uses: fabasoad/data-format-converter-action@main
id: yaml2json
with:
input: ${{ steps.yaml.outputs.file }}
from: 'yaml'
to: 'json'
-
name: Read YAML config
id: json
shell: bash
run: |
SETTINGS=$(cat ${{ inputs.file }})
SETTINGS=$(echo '${{ steps.yaml2json.outputs.output }}')
SETTINGS="${SETTINGS//'%'/'%25'}"
SETTINGS="${SETTINGS//$'\n'/}"
SETTINGS="${SETTINGS//$'\r'/}"
Expand Down
Binary file added assets/icons/amundsen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 828549f

Please sign in to comment.