Skip to content

Commit

Permalink
💚 Github Action environment variable fix
Browse files Browse the repository at this point in the history
Can’t set a variable and use it in the same action step
  • Loading branch information
mkarlesky committed Aug 3, 2024
1 parent f161395 commit 77aa3aa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,19 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}

# Generate the Version + Hash Name
- name: Version
# Generate the SHA string
- name: Git Commit Short SHA
id: git_commit_sha
shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# Generate the Version strings
- name: Version strings
id: versions
shell: bash
run: |
echo "short_ver=$(ruby ./lib/ceedling/version.rb)" >> $GITHUB_ENV
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "full_ver=$(ruby ./lib/ceedling/version.rb)-${{ env.sha_short }}" >> $GITHUB_ENV
# Build Gem
Expand Down

0 comments on commit 77aa3aa

Please sign in to comment.