File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 7
7
- ' **/*.yml'
8
8
branches :
9
9
- ' master'
10
+ - ' dev'
10
11
11
12
jobs :
12
13
docker :
13
14
runs-on : ubuntu-latest
14
15
steps :
16
+ - name : Set env to staging
17
+ if : endsWith(github.ref, '/dev')
18
+ run : |
19
+ echo "DOCKER_TAG=test" >> $GITHUB_ENV
20
+ - name : Set env to production
21
+ if : endsWith(github.ref, '/master')
22
+ run : |
23
+ echo "DOCKER_TAG=latest" >> $GITHUB_ENV
15
24
- name : Checkout
16
25
uses : actions/checkout@v2
17
26
- name : Set up QEMU
18
27
uses : docker/setup-qemu-action@v1
19
28
- name : Set up Docker Buildx
20
29
uses : docker/setup-buildx-action@v1
21
- - name : Cache Docker layers
22
- uses : actions/cache@v2
23
- with :
24
- path : /tmp/.buildx-cache
25
- key : ${{ runner.os }}-buildx-${{ github.sha }}
26
- restore-keys : |
27
- ${{ runner.os }}-buildx-
30
+
28
31
- name : Login to DockerHub
29
32
uses : docker/login-action@v1
30
33
with :
35
38
with :
36
39
context : .
37
40
push : true
38
- tags : ${{ secrets.DOCKERHUB_USERNAME }}/djangoblog:latest
39
- cache-from : type=local,src=/tmp/.buildx-cache
40
- cache-to : type=local,dest=/tmp/.buildx-cache-new
41
- - name : Move cache
42
- run : |
43
- rm -rf /tmp/.buildx-cache
44
- mv /tmp/.buildx-cache-new /tmp/.buildx-cache
41
+ tags : ${{ secrets.DOCKERHUB_USERNAME }}/djangoblog:${{DOCKER_TAG}}
45
42
46
43
Original file line number Diff line number Diff line change 1
1
coverage == 6.4
2
2
bleach == 5.0.0
3
- Django == 4.0.6
3
+ Django == 4.0.7
4
4
django-compressor == 4.0
5
5
django-haystack == 3.2.1
6
6
django-ipware == 4.0.2
You can’t perform that action at this time.
0 commit comments