-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (49 loc) · 1.34 KB
/
workflow.yml
File metadata and controls
57 lines (49 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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