forked from novuhq/novu
-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (117 loc) 路 4.83 KB
/
tag-images.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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Tag Docker Version
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
inputs:
version:
description: 'The version to tag docker images'
required: true
type: string
jobs:
tag_images:
runs-on: ubuntu-latest
timeout-minutes: 80
environment: Production
permissions:
contents: read
packages: write
deployments: write
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup kernel for react native, increase watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- uses: actions/setup-node@v3
with:
node-version: '20.8.1'
- name: Login to docker
env:
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
run: |
echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin
- name: Tag API
env:
REGISTRY_OWNER: novuhq
DOCKER_NAME: novu/api
IMAGE_TAG: ${{ github.sha }}
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
DOCKER_VERSION: ${{ inputs.version }}
run: |
docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
- name: Tag Worker
env:
REGISTRY_OWNER: novuhq
DOCKER_NAME: novu/worker
IMAGE_TAG: ${{ github.sha }}
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
DOCKER_VERSION: ${{ inputs.version }}
run: |
docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
- name: Tag WS
env:
REGISTRY_OWNER: novuhq
DOCKER_NAME: novu/ws
IMAGE_TAG: ${{ github.sha }}
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
DOCKER_VERSION: ${{ inputs.version }}
run: |
docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
- name: Tag EMBED
env:
REGISTRY_OWNER: novuhq
DOCKER_NAME: novu/embed
IMAGE_TAG: ${{ github.sha }}
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
DOCKER_VERSION: ${{ inputs.version }}
run: |
docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
- name: Tag WIDGET
env:
REGISTRY_OWNER: novuhq
DOCKER_NAME: novu/widget
IMAGE_TAG: ${{ github.sha }}
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
DOCKER_VERSION: ${{ inputs.version }}
run: |
docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
- name: Tag WEB
env:
REGISTRY_OWNER: novuhq
DOCKER_NAME: novu/web
IMAGE_TAG: ${{ github.sha }}
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
DOCKER_VERSION: ${{ inputs.version }}
run: |
docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
- name: Tag SDK
env:
REGISTRY_OWNER: novuhq
DOCKER_NAME: novu/sdk
IMAGE_TAG: ${{ github.sha }}
GH_ACTOR: ${{ github.actor }}
GH_PASSWORD: ${{ secrets.GH_PACKAGES }}
DOCKER_VERSION: ${{ inputs.version }}
run: |
docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod
docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION
docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION