Update docker-build-push.yml #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |