-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (48 loc) · 1.15 KB
/
test.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
name: docker-slim test
on:
push:
branches:
- master
paths:
- 'dist/*.js'
pull_request:
branches:
- '**'
paths:
- 'dist/*.js'
workflow_dispatch:
env:
IMAGE: "kitabisa/debian"
TAG: "jessie"
jobs:
docker-slim:
strategy:
matrix:
overwrite: [true, false]
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v3
- name: Build Docker image
uses: docker/build-push-action@v4
with:
file: test/Dockerfile
push: false
tags: ${{ env.IMAGE }}:${{ env.TAG }}
context: test/
- name: Before
run: docker image ls "${{ env.IMAGE }}"
- name: docker-slim
uses: kitabisa/docker-slim-action@master
id: slim
env:
DSLIM_HTTP_PROBE: false
with:
target: ${{ env.IMAGE }}:${{ env.TAG }}
overwrite: ${{ matrix.overwrite }}
- name: After
run: docker image ls "${{ env.IMAGE }}"
- name: Report
env:
REPORT: ${{ steps.slim.outputs.report }} # report is JSON format
run: echo "${REPORT}"