Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
paths-ignore:
- "**.md"
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate set "debug_enabled"'
type: boolean
required: false
default: false
schedule:
- cron: 0 0 * * *

Expand All @@ -19,30 +25,54 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
version: ['latest', '1.24.7']
version: ['latest', 'head', '1.24.8']
steps:
- uses: actions/checkout@v5
- uses: ./
with:
ddevDir: tests/fixtures/ddevProj1
autostart: false
version: ${{ matrix.version }}

- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true

- name: ddev version
run: |
if [[ ${{ matrix.version }} == '1.24.7' ]]; then
test "$(ddev --version)" == 'ddev version v1.24.7'
ddev --version
if [[ ${{ matrix.version }} == '1.24.8' ]]; then
test "$(ddev --version)" == 'ddev version v1.24.8'
else
test "$(ddev --version)" != 'ddev version v1.24.7'
test "$(ddev --version)" != 'ddev version v1.24.8'
fi

- name: ddev stopped
run: |
cd tests/fixtures/ddevProj1
test '"stopped"' = "$(ddev describe --json-output | jq '.raw.status')"

- name: start ddev
run: |
cd tests/fixtures/ddevProj1
ddev start --json-output --skip-confirmation

- name: Mailpit reachable
run: curl --silent --dump-header - --output /dev/null https://setup-ddev-proj1.ddev.site:8026

- name: "index.html: expected output"
run: test 'index.html test output' = "$(curl --silent https://setup-ddev-proj1.ddev.site)"

- name: restart ddev with project_tld=test
run: |
cd tests/fixtures/ddevProj1
ddev config --project-tld=test
ddev restart --json-output --skip-confirmation

- name: Mailpit reachable
run: curl --silent --dump-header - --output /dev/null https://setup-ddev-proj1.test:8026

- name: "index.html: expected output"
run: test 'index.html test output' = "$(curl --silent https://setup-ddev-proj1.test)"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ default: `latest`
```yaml
- uses: ddev/github-action-setup-ddev@v1
with:
version: 1.24.7
version: 1.24.8
```

### installScriptUrl
Expand Down Expand Up @@ -112,7 +112,7 @@ Example with custom script source:
uses: ddev/github-action-setup-ddev@v1
with:
installScriptUrl: "https://my-company.com/scripts/custom_ddev_install.sh"
version: "v1.24.7"
version: "v1.24.8"
```

## Common recipes
Expand Down
21 changes: 14 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,26 @@ runs:
- name: Download DDEV install script
shell: bash
run: |
curl -fsSL --retry 3 --retry-max-time 60 --retry-connrefused \
-o /tmp/install_ddev.sh \
"${{ inputs.installScriptUrl }}"
if [[ '${{ inputs.version }}' == 'head' && '${{ inputs.installScriptUrl }}' == 'https://ddev.com/install.sh' ]]; then
SCRIPT_URL="https://raw.githubusercontent.com/ddev/ddev/main/scripts/install_ddev_head.sh"
echo "Using head version install script: ${SCRIPT_URL}"
else
SCRIPT_URL="${{ inputs.installScriptUrl }}"
fi
curl -fsSL --retry 3 --retry-max-time 60 --retry-connrefused -o /tmp/install_ddev.sh "${SCRIPT_URL}"

- name: Install DDEV
shell: bash
run: |
if [[ '${{ inputs.version }}' != 'latest' ]]; then
if [[ '${{ inputs.version }}' == 'latest' ]]; then
VERSION_ARG=""
echo "Installing latest stable DDEV version"
elif [[ '${{ inputs.version }}' == 'head' ]]; then
VERSION_ARG=""
echo "Installing DDEV HEAD version"
else
VERSION_ARG="v${{ inputs.version }}"
echo "Installing DDEV version: ${VERSION_ARG}"
else
VERSION_ARG=""
echo "Installing latest DDEV version"
fi

# Make installation script executable
Expand Down