Skip to content

Commit e5f559d

Browse files
committed
Support copy
1 parent 65ce41a commit e5f559d

File tree

3 files changed

+52
-15
lines changed

3 files changed

+52
-15
lines changed

.github/workflows/copy.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
uses: akhilerm/[email protected]
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+
uses: akhilerm/[email protected]
48+
with:
49+
src: ossrs/srs:${{ env.FROM }}
50+
dst: |
51+
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.TO }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

auto/get_host_ip.sh

-15
This file was deleted.

0 commit comments

Comments
 (0)