-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathaction.yml
More file actions
36 lines (34 loc) · 796 Bytes
/
action.yml
File metadata and controls
36 lines (34 loc) · 796 Bytes
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
name: test-app
description: Build and Test in Docker
inputs:
dockerfile:
required: true
description: Dockerfile path
image:
required: true
description: Image name
target:
required: true
description: Target to run in Dockerfile
runs:
using: composite
steps:
- name: Build Test Image
uses: docker/build-push-action@v6
with:
context: .
file: ${{ inputs.dockerfile }}
tags: ${{ inputs.image }}
target: ${{ inputs.target }}
load: true
push: false
cache-from: |
type=gha
cache-to: |
type=gha
- name: Run Test Image
shell: bash
run: |
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
${{ inputs.image }}