Skip to content

Commit

Permalink
fix: extension build workflow, ref leather-io/issues#72
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed May 27, 2024
1 parent 2e7fd2d commit a24c6de
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,22 @@ jobs:
- sha-hash
- build
steps:
- name: Extract branch name
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: Extract and sanitize branch name
id: extract_branch
run: |
sanitized_branch=$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | sed 's/[^a-zA-Z0-9_-]/-/g')
echo "BRANCH_NAME=${sanitized_branch}" >> $GITHUB_ENV
- name: Storybook parsed branch name
id: storybook_branch
run: echo "STORYBOOK_BRANCH=`echo ${{ steps.extract_branch.outputs.branch }} | sed 's/\//\-/g'`" >> $GITHUB_OUTPUT
run: echo "STORYBOOK_BRANCH=${{ env.BRANCH_NAME }}" >> $GITHUB_ENV

- uses: kyranjamie/pull-request-fixed-header@v1.0.1
env:
EXTENSION_BUILD_LINK: '[Extension build](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})'
TEST_REPORT_LINK: '[Test report](https://leather-wallet.github.io/playwright-reports/${{ steps.extract_branch.outputs.branch }})'
STORYBOOK_LINK: '[Storybook](https://${{ steps.storybook_branch.outputs.STORYBOOK_BRANCH }}--65982789c7e2278518f189e7.chromatic.com)'
CHROMATIC_LINK: '[Chromatic](https://www.chromatic.com/library?appId=65982789c7e2278518f189e7&branch=${{ steps.extract_branch.outputs.branch }})'
TEST_REPORT_LINK: '[Test report](https://leather-wallet.github.io/playwright-reports/${{ env.BRANCH_NAME }})'
STORYBOOK_LINK: '[Storybook](https://${{ env.BRANCH_NAME }}--65982789c7e2278518f189e7.chromatic.com)'
CHROMATIC_LINK: '[Chromatic](https://www.chromatic.com/library?appId=65982789c7e2278518f189e7&branch=${{ env.BRANCH_NAME }})'
with:
GITHUB_TOKEN: ${{ secrets.LEATHER_BOT }}
header: |
Expand Down

0 comments on commit a24c6de

Please sign in to comment.