Skip to content

fix: enable Foundry .env file loading in contract deployment - #517

Open
ping-ke wants to merge 1 commit into
mainfrom
update-action
Open

fix: enable Foundry .env file loading in contract deployment#517
ping-ke wants to merge 1 commit into
mainfrom
update-action

Conversation

@ping-ke

@ping-ke ping-ke commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Description

Update the GitHub Actions workflow to enable Foundry to load environment variables from the .env configuration file in the storage-contracts-v1 project directory during contract deployment.

Reason for Change

The storage-contracts-v1 repository contains a .env configuration file in its project directory that is used to configure Foundry's local environment variables. The latest foundry-rs/foundry-toolchain@v1 has enhanced its security level and by default no longer loads environment variables from the project-level .env file.

By explicitly setting FOUNDRY_ALLOW_PROJECT_ENV=1, Foundry is allowed to correctly read the .env configuration file in the project directory.

Changes

.github/workflows/integration-test-l1.yml

Added FOUNDRY_ALLOW_PROJECT_ENV=1 configuration in the "Deploy Contracts" step:

GitHub Actions step-level environment variable:

- name: Deploy Contracts
  env:
    FOUNDRY_ALLOW_PROJECT_ENV: "1"

Shell script export:

export FOUNDRY_ALLOW_PROJECT_ENV=1

Both settings are required to ensure the environment variable is properly passed through different process layers.

Test Reference

See workflow run: Integration Test Run #32820620927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants