Skip to content

Commit

Permalink
add workflow to sync to tencent cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
xjia1 committed Dec 21, 2023
1 parent 3b45373 commit 9b34428
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/tencentyun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Sync to Tencent Cloud

on:
workflow_dispatch:
inputs:
target_tag:
type: string
required: true

env:
from_image: ghcr.io/naivesystems/analyze:latest
to_image: ccr.ccs.tencentyun.com/naivesystems/analyze:${{ github.event.inputs.target_tag }}

jobs:
sync:
runs-on: ubuntu-latest
environment: prod

steps:
- name: Pull Image
run: docker pull ${{ env.from_image }}

- name: Tag Image
run: docker tag ${{ env.from_image }} ${{ env.to_image }}

- name: Docker Login
uses: docker/login-action@v3
with:
registry: ccr.ccs.tencentyun.com
username: ${{ secrets.TENCENTYUN_USERNAME }}
password: ${{ secrets.TENCENTYUN_PASSWORD }}

- name: Push Image
run: docker push ${{ env.to_image }}

0 comments on commit 9b34428

Please sign in to comment.