submodule对gitea不管用,所以直接拉了一份拉格兰
This commit is contained in:
62
Lagrange.Core/.github/workflows/Lagrange.OneBot-docker-push.yml
vendored
Normal file
62
Lagrange.Core/.github/workflows/Lagrange.OneBot-docker-push.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Lagrange.OneBot Docker Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "Lagrange.Core/**"
|
||||
- "Lagrange.OneBot/**"
|
||||
- "Lagrange.Core.sln"
|
||||
- "LICENSE"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "Lagrange.Core/**"
|
||||
- "Lagrange.OneBot/**"
|
||||
- "Lagrange.Core.sln"
|
||||
- "LICENSE"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Github Registry
|
||||
uses: docker/login-action@v3
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.repository_owner }}/lagrange.onebot
|
||||
tags: |
|
||||
type=edge
|
||||
type=sha,event=branch
|
||||
type=ref,event=tag
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: "Lagrange.OneBot/Resources/Dockerfile"
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64, linux/arm64, linux/arm
|
||||
Reference in New Issue
Block a user