Skip to content

Commit

Permalink
Support copy
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 10, 2023
1 parent 65ce41a commit 000aa8f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 15 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Copy Image"

# @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
on:
push:
branches:
- 'copy-image'

jobs:
docker:
name: release-docker
runs-on: ubuntu-20.04
steps:
- name: Build envs
run: |
echo "FROM=ubuntu20-cache-23-11-10" >> $GITHUB_ENV
echo "TO=ubuntu20-cache-23-11-09" >> $GITHUB_ENV
# Docker
- name: Login docker hub
uses: docker/login-action@v2
with:
username: "${{ secrets.DOCKER_USERNAME }}"
password: "${{ secrets.DOCKER_PASSWORD }}"
- name: Copy to docker registry
uses: akhilerm/[email protected]
with:
src: ossrs/srs:${{ env.FROM }}
dst: |
ossrs/srs:${{ env.TO }}
# Aliyun
- name: Login aliyun hub
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: "${{ secrets.ACR_USERNAME }}"
password: "${{ secrets.ACR_PASSWORD }}"
- name: Copy to Aliyun registry
uses: akhilerm/[email protected]
with:
src: ossrs/srs:${{ env.FROM }}
dst: |
registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.TO }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
15 changes: 0 additions & 15 deletions auto/get_host_ip.sh

This file was deleted.

0 comments on commit 000aa8f

Please sign in to comment.