Skip to content

Commit

Permalink
feat: support copy-from
Browse files Browse the repository at this point in the history
  • Loading branch information
bittermandel authored Jun 28, 2024
1 parent 01eccfb commit 57a74df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ inputs:
manifest-path:
description: 'Path to molnett manifest'
required: true
copy-from:
description: 'Which environment to copy resources (e.g. secrets) from'
outputs:
environment-name:
description: 'Name of the created environment'
Expand Down Expand Up @@ -56,9 +58,10 @@ runs:
env:
ENV_NAME: ${{ steps.env-name.outputs.env }}
MANIFEST: ${{ inputs.manifest-path }}
COPY_FROM: ${{ inputs.copy-from }}
run: |
sed -i "s/environment:.*/environment: $ENV_NAME/" $MANIFEST
molnctl environments create $ENV_NAME || true
if [ $COPY_FROM ]; then molnctl environments create $ENV_NAME --copy-from=$COPY_FROM || true else molnctl environments create $ENV_NAME || true;
molnctl services deploy --no-confirm $MANIFEST
FINAL_NAME=$(sed -n 's/name: //p' $MANIFEST | awk '{$1=$1};1')
echo "name=$FINAL_NAME" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 57a74df

Please sign in to comment.