Skip to content

ref_name

ref_name #3

name: Create environment
on:
create:
workflow_dispatch:
push:
branches: # TODO: remove me
- 3577-app
defaults:
run:
working-directory: devops/scripts
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18.20"
- name: Get environment name
id: env_name
# TODO : replace with ${{ github.event.ref }}
run: |
env_name=$(node get-environment-name.js ${{ github.ref_name }})
echo "env_name: $env_name"
echo "env_name=$env_name" >> $GITHUB_OUTPUT
- name: Create environment
env:
SCW_SECRET_KEY: ${{ secrets.SCW_CI_DEPLOY_SECRET_KEY }}
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
run: node create-environment.js ${{ steps.env_name.outputs.env_name }}