File tree 3 files changed +52
-15
lines changed
3 files changed +52
-15
lines changed Original file line number Diff line number Diff line change
1
+ name : " Copy Image"
2
+
3
+ # @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
4
+ on :
5
+ workflow_dispatch :
6
+ inputs :
7
+ from :
8
+ description : ' From tag, such as ubuntu20-cache-23-11-10'
9
+ required : true
10
+ type : string
11
+ to :
12
+ description : ' To tag, such as ubuntu20-cache-23-11-09'
13
+ required : true
14
+ type : string
15
+
16
+ jobs :
17
+ docker :
18
+ name : release-docker
19
+ runs-on : ubuntu-20.04
20
+ steps :
21
+ - name : Build envs
22
+ run : |
23
+ echo "FROM=${{ inputs.from }}" >> $GITHUB_ENV
24
+ echo "TO=${{ inputs.to }}" >> $GITHUB_ENV
25
+
26
+ # Docker
27
+ - name : Login docker hub
28
+ uses : docker/login-action@v2
29
+ with :
30
+ username : " ${{ secrets.DOCKER_USERNAME }}"
31
+ password : " ${{ secrets.DOCKER_PASSWORD }}"
32
+ - name : Copy to docker registry
33
+
34
+ with :
35
+ src : ossrs/srs:${{ env.FROM }}
36
+ dst : |
37
+ ossrs/srs:${{ env.TO }}
38
+
39
+ # Aliyun
40
+ - name : Login aliyun hub
41
+ uses : docker/login-action@v2
42
+ with :
43
+ registry : registry.cn-hangzhou.aliyuncs.com
44
+ username : " ${{ secrets.ACR_USERNAME }}"
45
+ password : " ${{ secrets.ACR_PASSWORD }}"
46
+ - name : Copy to Aliyun registry
47
+
48
+ with :
49
+ src : ossrs/srs:${{ env.FROM }}
50
+ dst : |
51
+ registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.TO }}
Original file line number Diff line number Diff line change
1
+ .idea
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments