-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
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 |