Skip to content

Commit b5d96cd

Browse files
authored
Install DDEV via install script, allow custom script location (#46)
1 parent 9f0742a commit b5d96cd

File tree

274 files changed

+80
-100402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+80
-100402
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/dependabot.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/.idea
2-
#/node_modules

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,34 @@ default: `latest`
8484
version: 1.22.4
8585
```
8686

87+
### installScriptUrl
88+
89+
URL to the DDEV installation script. This allows you to specify a custom or alternative source for the DDEV installation script.
90+
91+
default: `https://ddev.com/install.sh`
92+
93+
```
94+
- uses: ddev/github-action-setup-ddev@v1
95+
with:
96+
installScriptUrl: "https://raw.githubusercontent.com/ddev/ddev/v1.22.4/scripts/install_ddev.sh"
97+
```
98+
99+
This option is useful for:
100+
- Using a specific version of the installation script from a tagged release
101+
- Testing with a development version from a specific branch
102+
- Using a forked or modified version of the installation script
103+
- Working with air-gapped environments that require local script hosting
104+
105+
Example with custom script source:
106+
107+
```
108+
- name: Setup DDEV with custom installation script
109+
uses: ddev/github-action-setup-ddev@v1
110+
with:
111+
installScriptUrl: "https://my-company.com/scripts/custom_ddev_install.sh"
112+
version: "v1.22.4"
113+
```
114+
87115
## Common recipes
88116

89117
### SSH keys

action.yml

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,62 @@
1-
name: 'Setup DDEV in Github Workflows'
2-
description: |
3-
This action installs **DDEV** in your Github Workflow.
1+
name: 'Setup and start DDEV action'
2+
description: 'Set up your GitHub Actions workflow with DDEV'
43
author: 'Jonas Eberle and DDEV contributors'
5-
runs:
6-
using: 'node24'
7-
main: 'lib/main.js'
8-
branding:
9-
icon: cpu
10-
color: yellow
4+
115
inputs:
126
ddevDir:
13-
description: 'ddev project directory'
7+
description: 'Path to your DDEV project. This path needs to contain the .ddev/ directory.'
148
required: false
159
default: '.'
10+
1611
autostart:
17-
description: 'Start ddev automatically'
12+
description: 'Starts your DDEV project immediately.'
1813
required: false
19-
default: true
14+
default: 'true'
15+
2016
version:
21-
description: 'Install a specific ddev version, such as 1.22.4'
17+
description: 'Install a specific DDEV version. Example: 1.24.0'
2218
required: false
2319
default: 'latest'
20+
21+
installScriptUrl:
22+
description: 'URL to the DDEV installation script'
23+
required: true
24+
default: 'https://ddev.com/install.sh'
25+
26+
runs:
27+
using: 'composite'
28+
steps:
29+
- name: Download DDEV install script
30+
shell: bash
31+
run: |
32+
curl -fsSL --retry 3 --retry-max-time 60 --retry-connrefused \
33+
-o /tmp/install_ddev.sh \
34+
"${{ inputs.installScriptUrl }}"
35+
36+
- name: Install DDEV
37+
shell: bash
38+
run: |
39+
if [[ '${{ inputs.version }}' != 'latest' ]]; then
40+
VERSION_ARG="v${{ inputs.version }}"
41+
echo "Installing DDEV version: ${VERSION_ARG}"
42+
else
43+
VERSION_ARG=""
44+
echo "Installing latest DDEV version"
45+
fi
46+
47+
# Make installation script executable
48+
chmod +x /tmp/install_ddev.sh
49+
50+
/tmp/install_ddev.sh ${VERSION_ARG}
51+
ddev config global --instrumentation-opt-in=false --omit-containers=ddev-ssh-agent
52+
53+
- name: Start DDEV project
54+
shell: bash
55+
working-directory: ${{ inputs.ddevDir }}
56+
if: inputs.autostart == 'true'
57+
run: |
58+
ddev start
59+
60+
branding:
61+
icon: 'cpu'
62+
color: yellow

lib/main.js

Lines changed: 0 additions & 111 deletions
This file was deleted.

node_modules/.bin/uuid

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.package-lock.json

Lines changed: 0 additions & 56 deletions
This file was deleted.

node_modules/.yarn-integrity

Lines changed: 0 additions & 20 deletions
This file was deleted.

node_modules/@actions/core/LICENSE.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)