Switch to using the main setup script for CI

This commit is contained in:
Matthew Lopez
2023-12-31 14:24:53 -05:00
committed by GitHub
parent 01223f5f9a
commit 1b17fbfc4d
2 changed files with 18 additions and 15 deletions

View File

@@ -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

View File

@@ -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