mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-09-11 04:46:46 -05:00
Switch to using the main setup script for CI
This commit is contained in:
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Test scripts and Docker image build
|
||||
name: Test scripts and build Docker images
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -20,20 +20,8 @@ jobs:
|
||||
- name: Set TERM environment variable
|
||||
run: echo "TERM=xterm" >> $GITHUB_ENV
|
||||
|
||||
- name: Test submodule patches script
|
||||
run: ./scripts/setup-submodule-patches.sh
|
||||
|
||||
- name: Test environment setup script
|
||||
run: ./scripts/setup-environment.sh 1.1.1.1 2.2.2.2 3.3.3.3
|
||||
|
||||
- name: Upload environment files
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: environment
|
||||
path: ./environment/
|
||||
|
||||
- name: Validate Docker Compose file
|
||||
run: docker compose config
|
||||
- name: Run the setup script
|
||||
run: ./setup.sh
|
||||
|
||||
- name: Build Docker images
|
||||
uses: docker/bake-action@v4
|
||||
|
||||
15
setup.sh
15
setup.sh
@@ -57,6 +57,15 @@ check_prerequisites() {
|
||||
|
||||
}
|
||||
|
||||
ci_setup() {
|
||||
warning "It looks like the script is running in CI. Only setup tasks required for building the Docker images will be performed."
|
||||
stage "Setting up submodules and applying patches."
|
||||
./scripts/setup-submodule-patches.sh
|
||||
stage "Setting up environment variables."
|
||||
./scripts/setup-environment.sh "1.1.1.1" "2.2.2.2" "3.3.3.3"
|
||||
success "CI setup completed."
|
||||
}
|
||||
|
||||
setup_environment_variables() {
|
||||
echo "Enter the IP address of your Pretendo Network server. It must be accessible to your console."
|
||||
read -r server_ip
|
||||
@@ -92,6 +101,12 @@ cd "$git_base"
|
||||
|
||||
title "Unofficial Pretendo Network setup script"
|
||||
header "Pretendo setup script started at $(date)."
|
||||
|
||||
if [ -n "${CI+x}" ]; then
|
||||
ci_setup
|
||||
exit 0
|
||||
fi
|
||||
|
||||
stage "Checking prerequisites."
|
||||
check_prerequisites
|
||||
|
||||
|
||||
Reference in New Issue
Block a user