-
Notifications
You must be signed in to change notification settings - Fork 25
66 lines (54 loc) · 1.63 KB
/
docker-build-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build and Push Docker Image
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Tag definition
branches:
- main
schedule:
- cron: "0 0 * * *" # Nightly build
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# Repository auschecken
- name: Checkout code
uses: actions/checkout@v3
# Docker-Setup
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Login bei Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Docker-Image build and push
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/paperless-ai:${{ github.ref_name }}
${{ secrets.DOCKER_USERNAME }}/paperless-ai:latest
nightly-build:
runs-on: ubuntu-latest
steps:
# Repository checkout
- name: Checkout code
uses: actions/checkout@v3
# Docker-Setup
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Login Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Docker-Image build and push (nightly)
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/paperless-ai:nightly