-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (43 loc) · 1.21 KB
/
sub-store.yml
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
name: 构建 Sub-Store Docker
on:
workflow_dispatch:
push:
branches:
- 'main'
paths-ignore:
- 'dist/**'
- 'README.md'
schedule:
- cron: "0 2 */3 * *"
jobs:
build_backend:
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# 设置 docker 环境
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
# docker login
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# build 并且 push docker 镜像
- name: Build and push
id: docker_build_backend
uses: docker/build-push-action@v3
with:
network: host
platforms: linux/amd64,linux/arm64
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/sub-store:latest
# 打印 docker 镜像 SHA256 Hash 值
- name: Image digest
run: echo ${{ steps.docker_build_backend.outputs.digest }}