Skip to content

Commit

Permalink
fix: secrets must be inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
lzecca78 committed Jan 3, 2025
1 parent 6fea514 commit 5a6f2df
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/actions/erlang-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ on:
type: string
default: .
description: "Elixir Mix project directory"
GHA_SSH_DEPLOY_KEY:
description: "SSH private key for deployment"
required: false
HEX_KEY:
description: "API Key for hex package publish on hex.pm"
required: false
Expand All @@ -54,7 +57,7 @@ jobs:
# perform secret check & put boolean result as an output
shell: bash
run: |
if [ "${{ secrets.GHA_SSH_DEPLOY_KEY }}" != '' ]; then
if [ "${{ inputs.GHA_SSH_DEPLOY_KEY }}" != '' ]; then
echo "gha_ssh_deploy_key_available=true" >> $GITHUB_OUTPUT;
else
echo "gha_ssh_deploy_key_available=false" >> $GITHUB_OUTPUT;
Expand Down Expand Up @@ -95,12 +98,12 @@ jobs:
with:
ssh-private-key: ${{ secrets.GHA_SSH_DEPLOY_KEY }}
- name: Login to hex.pm
run: rebar3 hex organization auth prima --key ${{ secrets.HEX_KEY }}
run: rebar3 hex organization auth prima --key ${{ inputs.HEX_KEY }}
- name: Install dependencies
run: rebar3 update; rebar3 deps
- name: Publish to Hex.pm
run: rebar3 hex publish -r hexpm:${{ inputs.hex-organization }}
env:
HEX_API_KEY: ${{ secrets.HEX_KEY }}
HEX_API_KEY: ${{ inputs.HEX_KEY }}
needs:
- secrets_check

0 comments on commit 5a6f2df

Please sign in to comment.