File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : build docker image
2+ on :
3+ push :
4+ branches :
5+ - release
6+ release :
7+ types : [ created ]
8+
9+ jobs :
10+ buildx :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v3
15+
16+ - name : Print GitHub context
17+ run : |
18+ echo "repository: ${{ github.repository }}"
19+ echo "actor: ${{ github.actor }}"
20+ echo "ref_name: ${{ github.ref_name }}"
21+
22+ - name : Set up QEMU
23+ uses : docker/setup-qemu-action@v2
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v2
26+
27+ - name : Login to DockerHub
28+ uses : docker/login-action@v2
29+ with :
30+ username : ${{ secrets.DOCKERHUB_USERNAME }}
31+ password : ${{ secrets.DOCKERHUB_TOKEN }}
32+
33+ - name : Login to GitHub Packages
34+ uses : docker/login-action@v2
35+ with :
36+ registry : ghcr.io
37+ username : ${{ github.actor }}
38+ password : ${{ secrets.GITHUBTOKEN }}
39+
40+ - name : Build and push
41+ id : docker_build
42+ uses : docker/build-push-action@v4
43+ with :
44+ context : .
45+ file : ./Dockerfile
46+ push : true
47+ platforms : linux/amd64,linux/arm64
48+ tags : |
49+ qyg2297248353/deeplx:${{ github.ref_name }}
50+ qyg2297248353/deeplx:latest
51+ ghcr.io/qyg2297248353/deeplx:${{ github.ref_name }}
52+ ghcr.io/qyg2297248353/deeplx:latest
Original file line number Diff line number Diff line change 1+ name : Sync Fork DeepLX
2+
3+ permissions :
4+ contents : write
5+
6+ on :
7+ schedule :
8+ - cron : " 0 */8 * * *"
9+ workflow_dispatch :
10+
11+ jobs :
12+ sync_latest_from_upstream :
13+ name : Sync latest commits from DeepLX
14+ runs-on : ubuntu-latest
15+ if : ${{ github.event.repository.fork }}
16+
17+ steps :
18+ # Step 1: run a standard checkout action
19+ - name : Checkout target repo
20+ uses : actions/checkout@v3
21+
22+ # Step 2: run the sync action
23+ - name : Sync DeepLX changes
24+ id : sync
25+ uses : aormsby/Fork-Sync-With-Upstream-action@v3.4
26+ with :
27+ upstream_sync_repo : OwO-Network/DeepLX
28+ upstream_sync_branch : main
29+ target_sync_branch : main
30+ target_repo_token : ${{ secrets.GITHUBTOKEN }}
31+
32+ test_mode : false
33+
34+ - name : Sync check
35+ if : failure()
36+ run : |
37+ echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次!"
38+ echo "[Error] Due to the change of the workflow file of the upstream repository, GitHub has automatically suspended this automatic update. You need to manually Sync Fork once!"
39+ exit 1
You can’t perform that action at this time.
0 commit comments