Skip to content

Deprecate old environment variable inputs#46

Merged
emmadesilva merged 12 commits into
masterfrom
deprecate-old-environment-variable-inputs
Nov 25, 2024
Merged

Deprecate old environment variable inputs#46
emmadesilva merged 12 commits into
masterfrom
deprecate-old-environment-variable-inputs

Conversation

@emmadesilva
Copy link
Copy Markdown
Member

@emmadesilva emmadesilva commented Nov 25, 2024

Abstract

With the improvements made in #45 we no longer need the following inputs, and thus these are deprecated:

Input Name Description Default Value
env-site-name Set the SITE_NAME environment variable none
env-site-url Set the SITE_URL environment variable none
env-torchlight-token Set the TORCHLIGHT_TOKEN environment variable none

Removal Timeline

They will be removed in v2.0.

Upgrade Guide

It's very easy to upgrade, just replace the legacy versions with the following:

- name: Old syntax
  uses: hydephp/action@master
  with:
    # Replace this:
    env-site-name: "'HydePHP Action'"
    env-torchlight-token: ${{ secrets.TORCHLIGHT_TOKEN }}

- name: New syntax
  uses: hydephp/action@master
  with:
    # With this:
    env: |
      SITE_NAME='HydePHP Action'
      TORCHLIGHT_TOKEN=${{ secrets.TORCHLIGHT_TOKEN }}

Of course, you only need to specify the values you actually use.

@emmadesilva
Copy link
Copy Markdown
Member Author

emmadesilva commented Nov 25, 2024

Manually confirmed to be working:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: hydephp/action@deprecate-old-environment-variable-inputs
        with:
          env-torchlight-token: ${{ secrets.TORCHLIGHT_TOKEN }}
          env-site-name: "'HydePHP Action'"
          env-site-url: 'test'
          env: |
            CUSTOM: ENV
# Dump of env vars
"SITE_NAME" => "HydePHP Action"
"SITE_URL" => "test"
"CUSTOM" => "ENV"
image

(The error is not relevant, it's just because I used dd() on the environment variables.)

@emmadesilva emmadesilva merged commit 71b9692 into master Nov 25, 2024
@emmadesilva emmadesilva deleted the deprecate-old-environment-variable-inputs branch November 25, 2024 20:02
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.

1 participant