generated from tj-actions/docker-action
-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.28 KB
/
test.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Test docker-run
steps:
- name: Checkout
uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build
uses: docker/build-push-action@v5
id: docker-build
with:
context: test
load: true
push: false
tags: user/app:latest
- name: Run docker-run
uses: ./
id: test-app-1
with:
name: test-app-1
image: user/app:latest
args: |
bash -c 'echo "Hello World" && ls'
- name: Run docker-run from a dockerhub image
uses: ./
id: test-app-2
with:
name: test-app-2
image: ubuntu:latest
args: |
bash -c 'echo "Hello World" && ls'
- name: Show output
run: |
echo '${{ toJSON(steps.test-app-1.outputs) }}'
echo '${{ toJSON(steps.test-app-2.outputs) }}'
shell:
bash