Skip to content

Clone Sample repository #6

Clone Sample repository

Clone Sample repository #6

Workflow file for this run

name: Clone Sample repository
on:
workflow_dispatch:
inputs:
TARGET_REPO:
description: 'The repository to clone to'
required: true
permissions:
contents: write
jobs:
clone-repo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: btp-automation-scenarios/sample-btptf-setup
path: source
sparse-checkout: |
.
.github
.devcontainer
infra
src
- uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.TARGET_REPO }}
path: target
token: ${{ secrets.GH_CLONE_TOKEN }}
- shell: bash
run: |
cp -rf source/* target/
cp -rf source/.devcontainer target/
cp -rf source/.github target/
cp -rf source/.gitignore target/
cd target
git config user.name "btp-automation-scenarios"
git config user.email "noreply@btpautomation.com"
git add .
git commit -m "Initial basic setup by GH Action"
git push