diff options
| author | Павел Жуков <33721692+LeaveMyYard@users.noreply.github.com> | 2023-05-28 00:06:05 +0300 |
|---|---|---|
| committer | Павел Жуков <33721692+LeaveMyYard@users.noreply.github.com> | 2023-05-28 00:06:05 +0300 |
| commit | 8991b1d8e55c5c22238520db1e45b081254ca39d (patch) | |
| tree | f22613e71cf5afd7b4defc3ba123d5053d03a6d0 /.github/workflows | |
| parent | 69900c43817919199389012de87d798a70e9d78b (diff) | |
Fix env variables in commit to homebrew
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build-on-release.yml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/.github/workflows/build-on-release.yml b/.github/workflows/build-on-release.yml index f8f60ab..166e7b7 100644 --- a/.github/workflows/build-on-release.yml +++ b/.github/workflows/build-on-release.yml @@ -112,7 +112,8 @@ jobs: with: name: krr-macos-latest-${{ github.ref_name }} - name: Calculate hash - run: echo "MAC_BUILD_HASH=$(sha256sum krr-macos-latest-${{ github.ref_name }}.zip | awk '{print $1}')" >> $GITHUB_ENV + id: calc-hash + run: echo "::set-output name=MAC_BUILD_HASH::$(sha256sum krr-macos-latest-${{ github.ref_name }}.zip | awk '{print $1}')" # Define Linux hash job linux-hash: @@ -126,7 +127,8 @@ jobs: with: name: krr-ubuntu-latest-${{ github.ref_name }} - name: Calculate hash - run: echo "LINUX_BUILD_HASH=$(sha256sum krr-ubuntu-latest-${{ github.ref_name }}.zip | awk '{print $1}')" >> $GITHUB_ENV + id: calc-hash + run: echo "::set-output name=LINUX_BUILD_HASH::$(sha256sum krr-ubuntu-latest-${{ github.ref_name }}.zip | awk '{print $1}')" # Define job to update homebrew formula update-formula: @@ -140,9 +142,9 @@ jobs: token: ${{ secrets.MULTIREPO_GITHUB_TOKEN }} - name: Update krr.rb formula run: | - MAC_BUILD_HASH=${{ needs.mac-hash.outputs.MAC_BUILD_HASH }} - LINUX_BUILD_HASH=${{ needs.linux-hash.outputs.LINUX_BUILD_HASH }} - RELEASE_VERSION=${{ github.ref_name }} + MAC_BUILD_HASH=${{ needs.mac-hash.outputs.calc-hash.MAC_BUILD_HASH }} + LINUX_BUILD_HASH=${{ needs.linux-hash.outputs.calc-hash.LINUX_BUILD_HASH }} + TAG_NAME=${{ github.ref_name }} awk 'NR==6{$0=" url \"https://github.com/robusta-dev/krr/releases/download/'"$TAG_NAME"'/krr-macos-latest-'"$TAG_NAME"'.zip\""}1' ./Formula/krr.rb > temp && mv temp ./Formula/krr.rb awk 'NR==7{$0=" sha256 \"'$MAC_BUILD_HASH'\""}1' ./Formula/krr.rb > temp && mv temp ./Formula/krr.rb awk 'NR==9{$0=" url \"https://github.com/robusta-dev/krr/releases/download/'"$TAG_NAME"'/krr-linux-latest-'"$TAG_NAME"'.zip\""}1' ./Formula/krr.rb > temp && mv temp ./Formula/krr.rb @@ -151,5 +153,5 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git commit -am "Update formula for release ${RELEASE_VERSION}" + git commit -am "Update formula for release ${TAG_NAME}" git push |
