Skip to content

Conversation

@emmadesilva
Copy link
Member

@emmadesilva emmadesilva commented Nov 25, 2024

Adds a feature to set arbitrary environment variables using the env input. Simply provide each variable in KEY=VALUE format, one per line:

- uses: hydephp/action@master
  with:
    deploy-to: "pages"
    env: |
      CUSTOM_VAR=value
      DEPLOY_SHA=${{ github.sha }}

The environment variables will be available during the build process. Note that if you're using sensitive information, you should use GitHub Secrets instead of hardcoding the values. Also make sure your input is valid "dotenv" syntax.

Fixes #43

@emmadesilva
Copy link
Member Author

Confirmed to be working great in a separate repo.

@emmadesilva emmadesilva force-pushed the support-array-input-for-any-arbitrary-environment-variables branch from 383c13c to 9dd69d8 Compare November 25, 2024 19:11
@emmadesilva emmadesilva force-pushed the support-array-input-for-any-arbitrary-environment-variables branch from f968c9e to 42b1f95 Compare November 25, 2024 19:19
@emmadesilva emmadesilva merged commit bd7d151 into master Nov 25, 2024
7 checks passed
@emmadesilva emmadesilva deleted the support-array-input-for-any-arbitrary-environment-variables branch November 25, 2024 19:21
@emmadesilva
Copy link
Member Author

As a side note: this works just fine if you just want to set one value:

env: CUSTOM=ENV

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.

Support array input for any arbitrary environment variables

2 participants