mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-12-29 10:21:59 +08:00
39 lines
879 B
YAML
39 lines
879 B
YAML
|
name: Docker-Build
|
||
|
|
||
|
on:
|
||
|
schedule:
|
||
|
- cron: "0 0 * * *" # Daily at midnight UTC
|
||
|
workflow_dispatch:
|
||
|
inputs:
|
||
|
trigger-build:
|
||
|
description: 'Trigger a manual build and push'
|
||
|
default: 'true'
|
||
|
|
||
|
env:
|
||
|
DOCKER_IMAGE: dselen/wgdashboard
|
||
|
|
||
|
jobs:
|
||
|
docker_build:
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
steps:
|
||
|
- name: Checkout repository
|
||
|
uses: actions/checkout@v4
|
||
|
|
||
|
- name: Log in to Docker Hub
|
||
|
uses: docker/login-action@v3
|
||
|
with:
|
||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||
|
|
||
|
- name: Set up Docker Buildx
|
||
|
uses: docker/setup-buildx-action@v3
|
||
|
|
||
|
- name: Build and export
|
||
|
uses: docker/build-push-action@v6
|
||
|
with:
|
||
|
context: .
|
||
|
push: true
|
||
|
tags: ${{ env.DOCKER_IMAGE }}:latest
|