Skip to content

feat: CI

feat: CI #2

Workflow file for this run

name: Service Build
permissions:
contents: read
packages: write
on:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: master-ci
cancel-in-progress: true
jobs:
treble:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout Code
uses: actions/checkout@v4
# Step 2: Set up Node environment + cache
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '25'
cache: 'npm'
# Step 4: ali Docker Login
- name: Docker Login
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# GHCR Docker Login
- name: Docker Login (GHCR)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Step 5: Build and Push Docker Image
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
registry.cn-hangzhou.aliyuncs.com/docker-cooooing/treble:latest
ghcr.io/cooooing/treble:latest