Adding templates
lint / lint (push) Failing after 10s
lint / smoke (push) Skipped

This commit is contained in:
Mostafa Ezzat
2026-11-09 09:21:20 +02:00
parent d67d814144
commit 885c5e121c
2 changed files with 105 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
name: Checkout Code Template
on:
workflow_call:
inputs:
target_branch:
description: 'Target branch to clone'
required: true
type: string
git_repo_url:
description: 'Git repository URL to clone from'
required: true
type: string
deployment_env:
description: 'Deployment environment name'
required: true
type: string
tags_version:
description: 'Tag version'
required: true
type: string
secrets:
GITLAB_TOKEN:
required: true
jobs:
checkout-and-verify:
runs-on: ubuntu-latest
steps:
- name: Show Configuration
run: |
echo "Target Branch: ${{ inputs.target_branch }}"
echo "Deployment Environment: ${{ inputs.deployment_env }}"
echo "Tags Version: ${{ inputs.tags_version }}"
- name: Checkout Code from GitLab
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
echo "Cloning branch '${{ inputs.target_branch }}'..."
git clone --branch ${{ inputs.target_branch }} https://oauth2:${GITLAB_TOKEN}@${{ inputs.git_repo_url }} .
- name: Verify Code Checkout
run: |
echo "Successfully checked out target branch!"
ls -la