38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Autodeploy Setup
|
|
description: Copy the `autodeploy` scripts into the caller repository, install prerequisites and run `setup.sh`.
|
|
inputs:
|
|
branch:
|
|
description: "Branch or ref to check out in the caller repository"
|
|
required: false
|
|
default: "main"
|
|
destination:
|
|
description: "Destination directory for the autodeploy scripts (relative to the repository root)"
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Checkout caller repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: true
|
|
ref: ${{ inputs.branch }}
|
|
path: tmp
|
|
|
|
- name: Deploy files
|
|
run: rsync -rlv "${GITHUB_WORKSPACE}/tmp/" "${{ inputs.destination }}/"
|
|
shell: bash
|
|
|
|
- name: Copy autodeploy into workspace
|
|
run: |
|
|
$GITHUB_ACTION_PATH/autodeploy/setup.sh "${{ inputs.destination }}"
|
|
shell: bash
|
|
|
|
# - name: Run autodeploy setup script
|
|
# working-directory: ${{ github.workspace }}
|
|
# run: |
|
|
# chmod +x autodeploy/setup.sh
|
|
# ./autodeploy/setup.sh
|
|
# shell: bash
|