Skip to content

Build

Build #143

Workflow file for this run

name: Build
on:
push:
branches:
- main
paths:
- "Dockerfile"
- "build.sh"
- "ddev-install.sh"
- ".github/workflows/build.yml"
schedule:
- cron: "0 1 * * 1"
jobs:
build:
name: Build and Push Container
runs-on: ubuntu-latest
strategy:
matrix:
version: [ latest, stable ]
steps:
-
name: Checkout code
uses: actions/checkout@v4
-
name: Docker info
run: docker info
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
-
name: Setup bats and bats libs
id: setup-bats
uses: bats-core/[email protected]
with:
support-path: "${{ github.workspace }}/tests/bats-support"
assert-path: "${{ github.workspace }}/tests/bats-assert"
detik-path: "${{ github.workspace }}/tests/bats-detik"
file-path: "${{ github.workspace }}/tests/bats-file"
-
name: "Test ddev ${{ matrix.version }} image"
shell: 'script -q -e -c "bash {0}"'
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
run: |
sudo snap install yq
./build.sh -v ${{ matrix.version }} -l
DDEV_VERSION=${{ matrix.version }} bash bats tests
-
name: Login to GitHub Packages Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: "Build ddev ${{ matrix.version }} multi-arch image"
shell: 'script -q -e -c "bash {0}"'
run: |
docker buildx create --use --platform=linux/arm64,linux/amd64
./build.sh -v ${{ matrix.version }} -x -p