41 lines
1.1 KiB
YAML
41 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"
|
|
# install_prereqs:
|
|
# description: "Whether to install prerequisites on the runner"
|
|
# required: false
|
|
# default: "true"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Checkout caller repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: true
|
|
ref: ${{ inputs.branch }}
|
|
|
|
- name: Copy autodeploy into workspace
|
|
run: |
|
|
cp -R "$GITHUB_ACTION_PATH/autodeploy" "$GITHUB_WORKSPACE/"
|
|
shell: bash
|
|
|
|
# - name: Install prerequisites
|
|
# if: ${{ inputs.install_prereqs == 'true' }}
|
|
# run: |
|
|
# sudo apt-get update
|
|
# sudo apt-get install -y curl tar
|
|
# shell: bash
|
|
|
|
- name: Run autodeploy setup script
|
|
working-directory: ${{ github.workspace }}/autodeploy
|
|
run: |
|
|
chmod +x setup.sh
|
|
./setup.sh
|
|
shell: bash
|