Skip to content
Open
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
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,37 @@ Example with custom script source:

## Common recipes

### Caching dependencies

GitHub runners start empty, so DDEV downloads every Composer, npm and Yarn
package on each run. [davereid/github-action-cache-ddev](https://github.com/davereid/github-action-cache-ddev)
caches the package caches DDEV already keeps between runs. Run it before the
project starts:

```yaml
on:
pull_request:
push:
# Pull requests can only restore caches saved on their own branch or the default branch.
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup DDEV
uses: ddev/github-action-setup-ddev@v1
with:
autostart: false
- uses: davereid/github-action-cache-ddev@v1
- run: ddev start
- run: ddev composer install
```

Caching DDEV's Docker images doesn't help: restoring them takes longer than
pulling them ([#15](https://github.com/ddev/github-action-setup-ddev/issues/15)).

### SSH keys

If your workflow needs to reach remote destinations that require private SSH keys,
Expand Down
Loading