Skip to content

Commit ff45041

Browse files
committed
chore: configurable repository owner input for cd workflow
1 parent 6afb9a3 commit ff45041

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/cd-backend.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
description: 'Docker image tag to deploy'
2121
required: true
2222
default: 'latest'
23+
repository_owner:
24+
description: 'GitHub repository owner (organization or user)'
25+
required: false
26+
default: 'GerardPaligot'
2327
workflow_run:
2428
workflows: ["Build and Push Backend Container"]
2529
types:
@@ -53,14 +57,17 @@ jobs:
5357
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
5458
echo "environment=${{ inputs.environment }}" >> $GITHUB_OUTPUT
5559
echo "image_tag=${{ inputs.image_tag }}" >> $GITHUB_OUTPUT
60+
echo "REPO_OWNER=${{ inputs.repository_owner }}"
61+
echo "repository_owner=${REPO_OWNER,,}" >> $GITHUB_OUTPUT
5662
elif [ "${{ github.event_name }}" = "push" ]; then
5763
echo "environment=production" >> $GITHUB_OUTPUT
5864
echo "image_tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
65+
echo "repository_owner=${GITHUB_REPO_OWNER,,}" >> $GITHUB_OUTPUT
5966
elif [ "${{ github.event_name }}" = "workflow_run" ]; then
6067
echo "environment=preprod" >> $GITHUB_OUTPUT
6168
echo "image_tag=latest" >> $GITHUB_OUTPUT
69+
echo "repository_owner=${GITHUB_REPO_OWNER,,}" >> $GITHUB_OUTPUT
6270
fi
63-
echo "repository_owner=${GITHUB_REPO_OWNER,,}" >> $GITHUB_OUTPUT
6471
6572
- name: Set Clever Cloud App ID
6673
id: app

0 commit comments

Comments
 (0)