Skip to content

Rework readme

Rework readme #23

name: Build and Push Docker Image
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate timestamp
id: timestamp
run: echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/holz_log:latest
${{ secrets.DOCKERHUB_USERNAME }}/holz_log:${{ steps.timestamp.outputs.timestamp }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/holz_log:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/holz_log:buildcache,mode=max
build-args: |
SECRET_KEY_BASE=${{ secrets.SECRET_KEY_BASE }}
DATABASE_PATH=/app/holz_log.db