bakerkretzmar / laravel-deploy-preview

A GitHub Action to deploy PR preview sites for Laravel apps.
MIT License
19 stars 6 forks source link

Set or update variables from github actions #12

Closed YevheniiRybak closed 1 year ago

YevheniiRybak commented 1 year ago

Could you please implement setting or updating env variables from github actions?

on:
  pull_request:
    types: [opened, closed, push]
jobs:
  deploy-preview:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: tighten/laravel-deploy-preview@v1
        with:
          forge-token: ${{ secrets.FORGE_TOKEN }}
          servers: |
            ***** *****
          env:
              NEW_VAR: ${{ secrets.NEW_VAR }}
              ...
bakerkretzmar commented 1 year ago

Just to be clear, you mean setting them in the deployed site? So the preview app in your example would have NEW_VAR set in the .env file on the Forge server? If so, yeah, great idea 👍🏻

YevheniiRybak commented 1 year ago

Yep! That is what I mean!

Do you need any help from my side?

I really need this feature)

@bakerkretzmar

bakerkretzmar commented 1 year ago

@YevheniiRybak yes, if you have an idea for how to implement it please send a PR! Otherwise I'll definitely take a stab at it in the next few weeks.

bakerkretzmar commented 1 year ago

Added in v1.1 💪🏻