Skip to content

Commit

Permalink
Update reusable-app-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMarsh82 authored Dec 11, 2023
1 parent a625669 commit 4c641aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/reusable-app-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ on:
jobs:
build:
outputs:
artifactname: ${{ steps.populate.outputs.artifactname }}
artifactname: ${{ steps.set_version.outputs.artifactname }}
GIT_SHA: ${{ steps.populate.outputs.GIT_SHA }}

runs-on: ubuntu-latest
Expand All @@ -79,14 +79,15 @@ jobs:
path: ".idems_app/deployments/${{env.DEPLOYMENT_NAME}}"

- name: Update artifact name to be version number
id: set_version
run: |
# Define the path to the file
FILE_PATH="./.idems_app/deployments/${{env.DEPLOYMENT_NAME}}/config.ts"
# Extract the version number
VERSION=$(grep 'content_tag_latest:' $FILE_PATH | sed 's/content_tag_latest: *"\(.*\)",/\1/')
echo "Extracted Version: $VERSION"
echo "artifactname=$VERSION" >> $GITHUB_OUTPUT
echo "artifactname=$VERSION" >> $GITHUB_ENV
- name: Populate Encryption key
if: env.DEPLOYMENT_PRIVATE_KEY != ''
Expand Down Expand Up @@ -120,7 +121,7 @@ jobs:
run: yarn build ${{inputs.build-flags}}

- name: Upload artifact
uses: actions/upload-pages-artifact@v1.0.8
uses: actions/upload-artifact@v2
with:
path: "www/"
name: ${{ needs.build.outputs.artifactname }}
Expand Down

0 comments on commit 4c641aa

Please sign in to comment.