Skip to content

Commit

Permalink
correcting version set
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Dec 18, 2023
1 parent 5a13b7f commit 5e19d6b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/deploy-documents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,19 @@ jobs:
- name: Determine versioning parameters
id: determine-versioning
run: |
# Read the first line from the VERSION file
LINE=$(head -n 1 ./VERSION)
VERSION="${LINE%|*}"
# Extract version and alias using parameter expansion
VERSION="${LINE%%|*}"
ALIAS="${LINE#*|}"
echo 'data={"version":"$VERSION", "alias":"$ALIAS"}' >> $GITHUB_OUTPUT

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

# Set the GitHub Actions environment variable
echo "data={\"version\":\"$VERSION\", \"alias\":\"$ALIAS\"}" >> $GITHUB_ENV

- name: Deploy
if: fromJson(steps.determine-versioning.outputs.data).version != null
Expand Down

0 comments on commit 5e19d6b

Please sign in to comment.