[+] 增加自动化构建
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 1m12s

This commit is contained in:
Martin 2025-01-13 15:51:37 +08:00
parent f4ec37b97c
commit ede14fd99b
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,29 @@
name: Build Docker Image
on:
push:
branches:
- main
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ secrets.DOCKER_HUB }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: true
tags: |
${{ secrets.DOCKER_TAG }}:latest
${{ secrets.DOCKER_TAG }}:${{ github.sha }}

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM scratch
COPY *.sh /scripts