mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-02-23 21:35:22 +08:00
44 lines
855 B
YAML
Executable File
44 lines
855 B
YAML
Executable File
|
|
name: Docker Image Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: docker-build
|
|
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 GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ secrets.GHCR_USERNAME }}
|
|
password: ${{ secrets.GHCR_PASSWORD }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ghcr.io/LiteyukiStudio/LiteyukiBot:latest
|
|
|
|
- name: Log out from GitHub Container Registry
|
|
run: docker logout ghcr.io
|