-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (72 loc) · 2.57 KB
/
docker-image.yml
File metadata and controls
79 lines (72 loc) · 2.57 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Docker Image CI
on:
push:
branches: [ "master"]
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Docker meta syncer
id: meta
uses: docker/metadata-action@v5
with:
images: |
anjia0532/discovery-syncer-python
flavor: |
latest=true
tags: |
type=semver,enable=true,pattern=v{{major}}
type=ref,enable=true,event=tag
type=raw,value=latest,enable={{is_default_branch}}
labels: |
maintainer=AnJia <anjia0532@gmail.com>
org.opencontainers.image.description=从注册中心(如Nacos,Eureka)同步实例信息到网关服务(如Apisix,Kong)
org.opencontainers.image.title=discovery-syncer-python
- name: Docker meta syncer backup
id: meta-backup
uses: docker/metadata-action@v5
with:
images: |
anjia0532/discovery-syncer-python-backup
flavor: |
latest=true
tags: |
type=semver,enable=true,pattern=v{{major}}
type=ref,enable=true,event=tag
type=raw,value=latest,enable={{is_default_branch}}
labels: |
maintainer=AnJia <anjia0532@gmail.com>
org.opencontainers.image.description=从注册中心(如Nacos,Eureka)同步实例信息到网关服务(如Apisix,Kong)
org.opencontainers.image.title=discovery-syncer-python-backup
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.HUB_NAME }}
password: ${{ secrets.HUB_PWD }}
- name: Build discovery-syncer-python image
uses: docker/build-push-action@v6
with:
context: .
file: misc/docker/Dockerfile
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=anjia0532/discovery-syncer-python:latest
cache-to: type=inline
- name: Build discovery-syncer-python-backup image
uses: docker/build-push-action@v6
with:
context: .
file: misc/docker/BackupDockerfile
push: true
labels: ${{ steps.meta-backup.outputs.labels }}
tags: ${{ steps.meta-backup.outputs.tags }}
cache-from: type=registry,ref=anjia0532/discovery-syncer-python-backup:latest
cache-to: type=inline