File tree Expand file tree Collapse file tree 2 files changed +26
-13
lines changed Expand file tree Collapse file tree 2 files changed +26
-13
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - ' **'
77 tags :
8- - ' v0.o '
8+ - ' v0.0 '
99 paths :
1010 - /.github/workflow/test_readme.yml
11-
1211
1312jobs :
14- build :
13+ no_cache_build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v2
18+ - uses : satackey/action-docker-layer-caching@v0.0
19+ - run : docker-compose -f test_project/docker-compose.yml -p test_project build
20+
21+ cached_build :
1522 runs-on : ubuntu-latest
1623
1724 steps :
1825 - uses : actions/checkout@v2
1926 - uses : satackey/action-docker-layer-caching@v0.0
20- with :
21- repotag : test_project_node
22- key : docker-compose-node-image-${{ hashFiles('yarn.lock') }}-${{ hashFiles('test_project/**') }}
2327
24- - run : docker image ls
25- - run : ls -al
28+ - name : Get cached image ID
29+ run : echo ::set-output name=id::$(docker image ls -q test_project_node)
30+ id : cached
2631
2732 - run : docker-compose -f test_project/docker-compose.yml -p test_project build
33+
34+ - name : Show built image ID
35+ run : echo ::set-output name=id::$(docker image ls -q test_project_node)
36+ id : latest
37+
38+ - name : Compare cached ID and after build ID
39+ run : |
40+ if [ ! '${{ steps.cached.outputs.id }}' = '${{ steps.latest.outputs.id }}' ];then
41+ echo cached != latest
42+ exit 1
43+ fi
44+
Original file line number Diff line number Diff line change 1212 steps :
1313 - uses : actions/checkout@v2
1414 - uses : satackey/action-docker-layer-caching@v0.0
15- with :
16- repotag : test_project_node
17- key : docker-compose-node-image-${{ hashFiles('yarn.lock') }}
18-
19- - run : docker-compose -f test_project/docker-compose.yml -p test_project build
15+ - run : docker-compose build
2016` ` `
You can’t perform that action at this time.
0 commit comments