Skip to content

Commit

Permalink
trying a json approach
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Dec 18, 2023
1 parent 5e19d6b commit e01cb90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/deploy-documents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,9 @@ jobs:
id: determine-versioning
run: |
# Read the first line from the VERSION file
LINE=$(head -n 1 ./VERSION)
# Extract version and alias using parameter expansion
VERSION="${LINE%%|*}"
ALIAS="${LINE#*|}"

# Print the extracted values for verification
echo "Version: $VERSION"
echo "Alias: $ALIAS"

DATA=$(head -n 1 ./VERSION)
# Set the GitHub Actions environment variable
echo "data={\"version\":\"$VERSION\", \"alias\":\"$ALIAS\"}" >> $GITHUB_ENV
echo "data=${DATA}" >> $GITHUB_ENV
- name: Deploy
if: fromJson(steps.determine-versioning.outputs.data).version != null
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4|
{"version":"5.4", "alias":""}

0 comments on commit e01cb90

Please sign in to comment.