Skip to content

Outputs

Outputs #4

Workflow file for this run

name: Outputs
on:
workflow_dispatch:
env:
APPROVAL_HOOK_ENV: "prod"
jobs:
capture_outputs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Generate Labels
id: labels
run: |
if [[ $APPROVAL_HOOK_ENV == "prod" ]]; then
echo "label1=first_label-prod" >> $GITHUB_OUTPUT
sed -i "s/env/ENV_PROD/g" print_env.js
else
echo "label1=first_label-int" $GITHUB_OUTPUT
sed -i "s/env/ENV_INT/g" print_env.js
fi
- run: echo "${{ steps.labels.outputs.label1 }}"
- run: cat print_env.js