Skip to content

Commit

Permalink
feat: fail action if transcrypt key is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLmqr committed Feb 13, 2024
1 parent 1b9d6e9 commit dc50cc8
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Env file to ElasticBeanstalk with Transcrypt
description: Add environnement file encoded with Transcrypt to ElasticBeanstalk

branding:
icon: 'file-text'
color: 'blue'
icon: "file-text"
color: "blue"

inputs:
env_file:
Expand All @@ -20,9 +20,15 @@ inputs:
runs:
using: composite
steps:
- shell: bash
run: git clone https://github.com/elasticdog/transcrypt.git
- shell: bash
run: transcrypt/transcrypt -c aes-256-cbc -p '${{ inputs.transcrypt_key }}' -y
- shell: bash
run: bash ${GITHUB_ACTION_PATH}/generate-eb-env.sh ${{ inputs.env_file }} ${{ inputs.eb_config_path }}
- name: Vérifier la variable secrète TRANSCRYPT_KEY
run: |
if [ -z "$TRANSCRYPT_KEY" ]; then
echo "La variable secrète TRANSCRYPT_KEY n'est pas définie."
exit 1
fi
- shell: bash
run: git clone https://github.com/elasticdog/transcrypt.git
- shell: bash
run: transcrypt/transcrypt -c aes-256-cbc -p '${{ inputs.transcrypt_key }}' -y
- shell: bash
run: bash ${GITHUB_ACTION_PATH}/generate-eb-env.sh ${{ inputs.env_file }} ${{ inputs.eb_config_path }}

0 comments on commit dc50cc8

Please sign in to comment.