hydephp / action

HydePHP GitHub Actions Workflow
https://hydephp.github.io/action
MIT License
3 stars 0 forks source link

Support array input for any arbitrary environment variables #45

Closed caendesilva closed 2 weeks ago

caendesilva commented 2 weeks ago

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 https://github.com/hydephp/action/issues/43

caendesilva commented 2 weeks ago

Confirmed to be working great in a separate repo.

caendesilva commented 2 weeks ago

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

env: CUSTOM=ENV