Skip to content

Commit

Permalink
🪲 Fix failing main publish action (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista authored Apr 2, 2024
1 parent 80a0633 commit 5d52744
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/actions/setup-environment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ description: Setup node & package manager, checkout code
runs:
using: "composite"
steps:
# Workaround for dubious ownership problem inside a containerized workflow
#
# See https://github.com/actions/runner-images/issues/6775
#
# A possible solution to investigate is to use the 1001 user
# https://github.com/actions/runner/issues/2033#issuecomment-1598547465
- name: Mark workspace directory as safe
shell: bash
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/reusable-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ jobs:
# in HOME folder and if it doesn't find one there it will create one
#
# Since we want to make sure it uses our .npmrc we'll just point it
# to our workspace root (which, in our container, is the /app directory)
HOME: /app
# to our workspace root (which, in a workflow that uses a container, is put under __w directory)
#
# Here we need to use the ${GITHUB_WORKSPACE} environment variable instead
# of the context value ${{ github.workspace }}
#
# See more here https://github.com/actions/runner/issues/2058
HOME: ${GITHUB_WORKSPACE}
GITHUB_TOKEN: ${{ secrets.LAYERZERO_BOT_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISHER }}

0 comments on commit 5d52744

Please sign in to comment.