Skip to content

Update Dockerfile and GitHub Actions #91

Update Dockerfile and GitHub Actions

Update Dockerfile and GitHub Actions #91

Workflow file for this run

name: Publish Docker Image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docker-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version
id: version
run: echo version=$(printf "ouuan-r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)") >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
file: Dockerfile
build-args: version=${{ steps.version.outputs.version }}
push: true
tags: |
ouuan/timetagger:latest
platforms: linux/amd64