[+] 增加自动化构建
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 1m12s
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 1m12s
This commit is contained in:
parent
f4ec37b97c
commit
ede14fd99b
29
.gitea/workflows/demo.yaml
Normal file
29
.gitea/workflows/demo.yaml
Normal 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
3
Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM scratch
|
||||||
|
|
||||||
|
COPY *.sh /scripts
|
Loading…
x
Reference in New Issue
Block a user