Skip to content

Commit

Permalink
actions: Add docker publisher job.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyhunsen committed Oct 8, 2024
1 parent f2de66d commit d06b627
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Docker Image and Publish on Docker Hub

on:
workflow_dispatch:
schedule:
# every day
- cron: "13 21 * * *" # 21:13 UTC

env:
CARGO_TERM_COLOR: always

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Except in `main` branch! Any cancelled job will cause the
# CI run to fail, and we want to keep a clean history for major branches.
cancel-in-progress: ${{ (github.ref != 'refs/heads/main') }}

jobs:
docker:
timeout-minutes: 120
name: Build and publish Docker image
runs-on: ubicloud-standard-16
steps:
- uses: actions/checkout@v4
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/clementine:latest

0 comments on commit d06b627

Please sign in to comment.