Commit 0d9e7ac 1 parent ff97be0 commit 0d9e7ac Copy full SHA for 0d9e7ac
File tree 3 files changed +21
-3
lines changed
3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 37
37
38
38
- uses : actions/checkout@v2
39
39
40
+ - uses : dorny/paths-filter@v2
41
+ id : changes
42
+ with :
43
+ filters : |
44
+ base:
45
+ - 'base/**'
46
+
40
47
- name : Set up Python 3.8
41
48
uses : actions/setup-python@v2
42
49
with :
@@ -52,10 +59,15 @@ jobs:
52
59
working-directory : base
53
60
54
61
- name : Base Images > Docker Build & Push
55
- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
62
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.changes.outputs.base != 'true' }}
56
63
run : ./docker_tags.sh -p
57
64
working-directory : base
58
65
66
+ - name : Base Images > Docker Build & Push
67
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.changes.outputs.base == 'true' }}
68
+ run : ./docker_tags.sh -p -f
69
+ working-directory : base
70
+
59
71
- name : Install dependencies
60
72
run : pip install -r requirements.txt
61
73
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ if [[ -n "$folder" ]]; then
11
11
fi
12
12
13
13
chown www-data:www-data -R $folder /prestashop/
14
+ # Copy all files (included .env files)
14
15
cp -n -R -T -p $folder /prestashop/ /var/www/html
15
16
else
16
17
echo " Missing folder to move"
Original file line number Diff line number Diff line change 8
8
PS_VERSIONS_FILE=" $1 " ;
9
9
fi
10
10
11
- while getopts " :p" option; do
11
+ FORCE=false
12
+ while getopts " :fp" option; do
12
13
case $option in
13
14
p)
14
15
PUSH=true
15
16
;;
17
+ f)
18
+ FORCE=true
19
+ ;;
16
20
esac
17
21
done
18
22
@@ -22,8 +26,9 @@ docker_tag_exists() {
22
26
23
27
docker_image ()
24
28
{
25
- if docker_tag_exists prestashop/base ${version} ; then
29
+ if ! $FORCE && docker_tag_exists prestashop/base ${version} ; then
26
30
echo " Docker Image already pushed : prestashop/base:$version "
31
+ return
27
32
else
28
33
echo " Docker build & tag : prestashop/base:$version "
29
34
id=$( echo $( docker build --quiet=true images/${version} 2> /dev/null) | awk ' {print $NF}' )
You can’t perform that action at this time.
0 commit comments