Skip to content

Commit

Permalink
Try expression
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Oct 17, 2024
1 parent 768c3d1 commit a7d0fb3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:

jobs:

# You cannot do ${{ github.sha }}:0:7 so creating a job to get the short-sha
short-sha:
runs-on: ubuntu-latest
outputs:
Expand All @@ -34,10 +35,10 @@ jobs:
needs: [short-sha]
env:
IMAGE_TAG: ${{ needs.short-sha.outputs.value }}
IMAGE_NAME: cyberdojo/dashboard:${{ needs.short-sha.outputs.value }}
IMAGE_NAME: cyberdojo/${{ env.SERVICE_NAME }}:${{ needs.short-sha.outputs.value }}
outputs:
tag: ${{ steps.variables.outputs.tag }}
name: ${{ steps.variables.outputs.name }}
tag: ${{ needs.short-sha.outputs.value }}
fingerprint: ${{ steps.variables.outputs.fingerprint }}
steps:
- uses: actions/checkout@v4
Expand All @@ -46,7 +47,7 @@ jobs:

- name: Do wibble
id: wibble
run:
run: |
echo "IMAGE_TAG=:${IMAGE_TAG}:"
echo "IMAGE_NAME=:${IMAGE_NAME}:"
exit 0
Expand All @@ -72,6 +73,7 @@ jobs:
FINGERPRINT=ce707b630a5602097df22253e80a6305b46340b354f27776f45fc2a2688522b4
echo "fingerprint=${FINGERPRINT}" >> ${GITHUB_OUTPUT}
SHORT_SHA=${{ needs.short-sha.outputs.value }}
echo "tag=${SHORT_SHA}" >> ${GITHUB_OUTPUT}
echo "name=cyberdojo/dashboard:${SHORT_SHA}" >> ${GITHUB_OUTPUT}
Expand Down

0 comments on commit a7d0fb3

Please sign in to comment.