mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-24 22:25:06 +08:00
新增GitHub Actions工作流以构建和推送Docker镜像,更新.gitignore以排除.github目录
This commit is contained in:
parent
94a021bab0
commit
df00c61dd8
43
.github/workflows/build-image.yml
vendored
Normal file
43
.github/workflows/build-image.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
name: Docker Image Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to Harbor
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.liteyuki.icu
|
||||
username: ${{ secrets.GITEA_USERNAME }}
|
||||
password: ${{ secrets.GITEA_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.liteyuki.icu/bot/app:latest
|
||||
|
||||
- name: Log out from Gitea
|
||||
run: docker logout git.liteyuki.icu
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,7 +24,6 @@ config.yml
|
||||
config.example.yml
|
||||
|
||||
# vuepress
|
||||
.github
|
||||
|
||||
# mupy
|
||||
mypy.ini
|
||||
|
Loading…
Reference in New Issue
Block a user