-
-
Notifications
You must be signed in to change notification settings - Fork 142
44 lines (34 loc) · 1.07 KB
/
dockerimage.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
38
39
40
41
42
43
44
name: Check if a Docker image can be built
on:
push:
branches: [ devel ]
pull_request:
jobs:
build_docker_image:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
DOCKER_TAG: ghcr.io/macbre/phantomas:latest
steps:
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build the Docker image with ${{ env.DOCKER_TAG }} tag
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ env.DOCKER_TAG }}
build-args: |
GITHUB_SHA=${{ github.sha }}
cache-from: |
${{ env.DOCKER_TAG }}
- name: Inspect built image
run: |
docker images
docker inspect --format='{{json .Config.Labels}}' ${{ env.DOCKER_TAG }} | jq
- name: Run phantomas CLI script inside the container
run: |
./test/server-start.sh
docker run \
--network=host \
--security-opt seccomp=$(pwd)/chrome-seccomp.json \
${{ env.DOCKER_TAG }} ./bin/phantomas.js http://127.0.0.1:8888/ --pretty