mirror of
https://github.com/purofle/remake_bot.git
synced 2025-06-17 23:03:30 +08:00
CI:Add autobuild docker image (#6)
Co-authored-by: purofle <purofle@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
6dbcf3153c
commit
28a13039a3
33
.github/workflows/docker.yml
vendored
Normal file
33
.github/workflows/docker.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # default branch
|
||||||
|
paths:
|
||||||
|
- bot/**
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Ghcr:
|
||||||
|
name: Publish to ghcr.io
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.2.2
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.8.0
|
||||||
|
- name: Login
|
||||||
|
uses: docker/login-action@v3.3.0
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Build & Push
|
||||||
|
uses: docker/build-push-action@v6.11.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/purofle/sbbot:latest
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
cache-from: type=registry,ref=ghcr.io/purofle/sbbot:latest
|
||||||
|
cache-to: type=inline
|
Loading…
Reference in New Issue
Block a user