File tree 3 files changed +77
-11
lines changed
3 files changed +77
-11
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,6 @@ RUN echo "Hello, World 3! \$(date)" > /files/003.txt
9
9
RUN echo "Hello, World 4! \$ (date)" > /files/x/004.txt
10
10
RUN echo "Hello, World 5! \$ (date)" > /files/x/005.txt
11
11
RUN echo "Hello, World 6! \$ (date)" > /files/y/006.txt
12
+
13
+ RUN mkdir -p /app/
14
+ RUN echo "<h1>Hello, World!</h1>" > /app/index.html
Original file line number Diff line number Diff line change
1
+ name : Test Readme Example
2
+
3
+ on : [workflow_dispatch]
4
+
5
+ jobs :
6
+ build-extract :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+ - name : Build Docker Image
11
+ uses : docker/build-push-action@v5
12
+ with :
13
+ context : ./.github/tests
14
+ tags : my-example-image:latest
15
+ load : true
16
+ - uses : shrink/actions-docker-extract@v3
17
+ id : extract
18
+ with :
19
+ image : my-example-image:latest
20
+ path : /app/.
21
+ destination : dist
22
+ - name : Upload Dist
23
+ uses : actions/upload-artifact@v3
24
+ with :
25
+ path : dist
26
+ example-image :
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - uses : actions/checkout@v4
30
+ - name : Login to GitHub Container Registry
31
+ uses : docker/login-action@v3
32
+ with :
33
+ registry : " ghcr.io"
34
+ username : " ${{ github.actor }}"
35
+ password : " ${{ secrets.GITHUB_TOKEN }}"
36
+ - name : Build Docker Image
37
+ uses : docker/build-push-action@v5
38
+ with :
39
+ context : ./.github/tests
40
+ push : true
41
+ tags : ghcr.io/${{ github.repository }}:latest
42
+ login-pull-extract :
43
+ runs-on : ubuntu-latest
44
+ needs :
45
+ - example-image
46
+ steps :
47
+ - uses : actions/checkout@v4
48
+ - name : Login to GitHub Container Registry
49
+ uses : docker/login-action@v2
50
+ with :
51
+ registry : " ghcr.io"
52
+ username : " ${{ github.actor }}"
53
+ password : " ${{ secrets.GITHUB_TOKEN }}"
54
+ - uses : shrink/actions-docker-extract@v3
55
+ id : extract
56
+ with :
57
+ image : ghcr.io/${{ github.repository }}:latest
58
+ path : /app/.
59
+ destination : dist
60
+ - name : Upload Dist
61
+ uses : actions/upload-artifact@v3
62
+ with :
63
+ path : dist
Original file line number Diff line number Diff line change @@ -44,18 +44,18 @@ jobs:
44
44
- name: Build Docker Image
45
45
uses: docker/build-push-action@v5
46
46
with:
47
- repository : my-example-image
48
- tags: latest
47
+ tags : my-example-image:latest
48
+ load: true
49
49
- uses: shrink/actions-docker-extract@v3
50
50
id: extract
51
51
with:
52
- image: my-example-image
52
+ image: my-example-image:latest
53
53
path: /app/.
54
+ destination: dist
54
55
- name: Upload Dist
55
56
uses: actions/upload-artifact@v3
56
57
with:
57
- path: ${{ steps.extract.outputs.destination }}
58
- name: dist
58
+ path: dist
59
59
` ` `
60
60
61
61
# ## Login, Pull, Extract
@@ -70,21 +70,21 @@ jobs:
70
70
steps:
71
71
- uses: actions/checkout@v4
72
72
- name: Login to GitHub Container Registry
73
- uses: docker/login-action@v1
73
+ uses: docker/login-action@v2
74
74
with:
75
- registry: ghcr.io
76
- username: ${{ github.repository_owner }}
77
- password: ${{ secrets.GHCR_PAT }}
75
+ registry: " ghcr.io"
76
+ username: " ${{ github.actor }}"
77
+ password: " ${{ secrets.GITHUB_TOKEN }}"
78
78
- uses: shrink/actions-docker-extract@v3
79
79
id: extract
80
80
with:
81
81
image: ghcr.io/${{ github.repository }}:latest
82
82
path: /app/.
83
+ destination: dist
83
84
- name: Upload Dist
84
85
uses: actions/upload-artifact@v3
85
86
with:
86
- path: ${{ steps.extract.outputs.destination }}
87
- name: dist
87
+ path: dist
88
88
` ` `
89
89
90
90
# # Automatic Release Packaging
You can’t perform that action at this time.
0 commit comments