@@ -3,66 +3,65 @@ name: Record Expected
3
3
on :
4
4
workflow_dispatch :
5
5
6
+ env :
7
+ # Use docker.io for Docker Hub if empty
8
+ REGISTRY : ghcr.io
9
+ # github.repository as <account>/<repo>
10
+ IMAGE_NAME : ${{ github.repository }}
11
+
6
12
jobs :
7
- record-expected-output :
13
+ resolve-image-tag :
8
14
runs-on : ubuntu-latest
15
+ outputs :
16
+ tag : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.regex-match.outputs.group1 }}
9
17
steps :
10
18
- name : Checkout repository
11
19
uses : actions/checkout@v2
12
-
13
- - name : Build test project 'simple'
14
- uses : ./
15
- with :
16
- source : test_projects/simple
17
- destination : test_projects/simple/_expected
18
- build_revision : JEKYLL_BUILD_REVISION
19
-
20
- - name : Build test project 'readme'
21
- uses : ./
20
+ - name : Grep action.yaml content
21
+ id : grep-image-content
22
+ run : |
23
+ image=$(grep -E "jekyll-build-pages.*\'" action.yml)
24
+ echo "::set-output name=image::$image"
25
+ - uses : actions-ecosystem/action-regex-match@v2
26
+ id : regex-match
22
27
with :
23
- source : test_projects/readme
24
- destination : test_projects/readme/_expected
25
- build_revision : JEKYLL_BUILD_REVISION
28
+ text : ${{ steps.grep-image-content.outputs.image }}
29
+ regex : " jekyll-build-pages:(.*)'"
26
30
27
- - name : Build test project 'octicons'
28
- uses : ./
29
- with :
30
- source : test_projects/octicons
31
- destination : test_projects/octicons/_expected
32
- build_revision : JEKYLL_BUILD_REVISION
33
-
34
- - name : Build test project 'mojombo'
35
- uses : ./
36
- with :
37
- source : test_projects/mojombo
38
- destination : test_projects/mojombo/_expected
39
- build_revision : JEKYLL_BUILD_REVISION
40
-
41
- - name : Build test project 'themes'
42
- uses : ./
43
- with :
44
- source : test_projects/themes
45
- destination : test_projects/themes/_expected
46
- build_revision : JEKYLL_BUILD_REVISION
47
-
48
- - name : Build test project 'jekyll-include-cache'
49
- uses : ./
31
+ test-builds :
32
+ needs : resolve-image-tag
33
+ runs-on : ubuntu-latest
34
+ strategy :
35
+ matrix :
36
+ test :
37
+ - simple
38
+ - readme
39
+ - octicons
40
+ - mojombo
41
+ - themes
42
+ - jekyll-include-cache
43
+ - future-false
44
+ - future-true
45
+ steps :
46
+ - name : Checkout repository
47
+ uses : actions/checkout@v2
48
+ - name : Build local docker image
49
+ uses : docker/build-push-action@v2
50
50
with :
51
- source : test_projects/jekyll-include-cache
52
- destination : test_projects/jekyll-include-cache/_expected
53
- build_revision : JEKYLL_BUILD_REVISION
51
+ context : .
52
+ file : Dockerfile
53
+ tags : ${{ needs.resolve-image-tag.outputs.tag }}
54
54
55
- - name : Build test project 'future-false'
55
+ - name : Build ${{ matrix. test }} Project
56
56
uses : ./
57
57
with :
58
- source : test_projects/future-false
59
- destination : test_projects/future-false /_expected
58
+ source : ./ test_projects/${{ matrix.test }}
59
+ destination : ./ test_projects/${{ matrix.test }} /_expected
60
60
build_revision : JEKYLL_BUILD_REVISION
61
+ token : ${{ secrets.GITHUB_TOKEN }}
61
62
62
- - name : Build test project 'future-true'
63
- uses : ./
63
+ - name : Archive ${{ matrix. test }} Project
64
+ uses : actions/upload-artifact@v3
64
65
with :
65
- source : test_projects/future-true
66
- destination : test_projects/future-true/_expected
67
- build_revision : JEKYLL_BUILD_REVISION
68
-
66
+ name : ${{ matrix.test }}
67
+ path : ./test_projects/${{ matrix.test }}/_expected
0 commit comments