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 783aab6 commit b4be705
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,32 @@ env:

jobs:

short-sha:
runs-on: ubuntu-latest
outputs:
value: ${{ steps.variable.outputs.value }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set outputs
id: variable
run:
echo "value=${GITHUB_SHA:0:7}" >> ${GITHUB_OUTPUT}

job-1:
runs-on: ubuntu-latest
needs: []
needs: [short-sha]
env:
SHORT_SHA: ${{ needs.short-sha.outputs.value }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Do wibble
id: wibble
env:
SHORT_SHA: ${GITHUB_SHA:0:7}
run:
echo "SHORT_SHA=:${SHORT_SHA}:"
exit 0
Expand Down

0 comments on commit b4be705

Please sign in to comment.