Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate old environment variable inputs #46

Merged
merged 12 commits into from
Nov 25, 2024

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva 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.

@caendesilva
Copy link
Member Author

caendesilva 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.)

@caendesilva caendesilva merged commit 71b9692 into master Nov 25, 2024
7 checks passed
@caendesilva caendesilva 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