-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1015 Bytes
/
container_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Container CI
on:
workflow_dispatch:
pull_request_target:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
platform: ["linux/amd64", "linux/arm64/v8", "linux/arm/v7"]
busybox: ["glibc", "musl", "uclibc"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64,arm
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Build container
uses: docker/build-push-action@v6
with:
build-args: PLATFORM=${{ matrix.platform }}
context: .
file: ./Dockerfile
load: true
push: false
tags: test-${{ matrix.platform }}-${{ matrix.busybox }}
- name: Test
run: |
test "$(docker run --rm -i "test-${{ matrix.platform }}-${{ matrix.busybox }}" -c "php -r 'echo shell_exec(\"whoami\");'")" = "nonroot"