-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.12 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Test docker-cp
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@v6
id: docker-build
with:
context: .
load: true
push: false
tags: user/app:latest
- name: Run
uses: tj-actions/docker-run@v2
id: docker-run
with:
image: user/app:latest
name: test-app
args: bash -c 'ls && sleep 2'
- name: Copy from container to host
uses: ./
with:
container: ${{ steps.docker-run.outputs.container-id }}
source: /entrypoint.sh
destination: entrypoint-new.sh
- name: Display contents of entrypoint-new.sh
run: cat entrypoint-new.sh