-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update to MorphoCloud/MorphoCloudWorkflow@328e926
List of MorphoCloudWorkflow changes: ``` $ git shortlog a644d53..328e926 --no-merges Jean-Christophe Fillion-Robin (1): fix(extract-issue-fields): Avoid evaluation of backticks as bash command ``` See MorphoCloud/MorphoCloudWorkflow@a644d53...328e926
- Loading branch information
Showing
1 changed file
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,36 +48,50 @@ runs: | |
- name: Display parsed data | ||
shell: bash | ||
run: | | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | jq . | ||
cat <<'EOF' | jq . | ||
${{ steps.parse.outputs.data }} | ||
EOF | ||
- name: Extract fields | ||
id: extract | ||
shell: bash | ||
run: | | ||
instance_flavor=$(echo ${{ toJSON(steps.parse.outputs.data) }} | \ | ||
jq -r '."cloud-computing-instance-flavor".text | split(" - ")[0]') | ||
instance_flavor=$( | ||
cat <<'EOF' | \ | ||
jq -r '."cloud-computing-instance-flavor".text | split(" - ")[0]' | ||
${{ steps.parse.outputs.data }} | ||
EOF | ||
) | ||
echo "instance_flavor [$instance_flavor]" | ||
echo "instance_flavor=$instance_flavor" >> $GITHUB_OUTPUT | ||
orcid=$( | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | | ||
cat <<'EOF' | \ | ||
jq -r ".orcid.text" | ||
${{ steps.parse.outputs.data }} | ||
EOF | ||
) | ||
echo "orcid [$orcid]" | ||
echo "orcid=$orcid" >> $GITHUB_OUTPUT | ||
# Also strip "<" and ">" to convert from "<[email protected]>" to "[email protected]" | ||
email=$( | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | | ||
jq -r ".email.text" | | ||
cat <<'EOF' | \ | ||
jq -r ".email.text" | \ | ||
sed -E 's/^<([^<>]+)>$/\1/' | ||
${{ steps.parse.outputs.data }} | ||
EOF | ||
) | ||
echo "email [$email]" | ||
echo "email=$email" >> $GITHUB_OUTPUT | ||
# Also strip "<" and ">" to convert from "<[email protected]>" to "[email protected]" | ||
confirm_email=$( | ||
echo ${{ toJSON(steps.parse.outputs.data) }} | | ||
jq -r '."confirm-email".text // empty' | | ||
cat <<'EOF' | \ | ||
jq -r '."confirm-email".text // empty' | \ | ||
sed -E 's/^<([^<>]+)>$/\1/' | ||
${{ steps.parse.outputs.data }} | ||
EOF | ||
) | ||
# If the "Confirm Email" field is missing (e.g., in older issues), | ||
|
@@ -86,4 +100,5 @@ runs: | |
confirm_email="$email" | ||
fi | ||
echo "confirm_email [$confirm_email]" | ||
echo "confirm_email=$confirm_email" >> $GITHUB_OUTPUT |