mirror of
				https://github.com/DaoCloud/public-image-mirror.git
				synced 2025-11-04 08:26:16 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			884 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			884 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Sync
 | 
						|
 | 
						|
on:
 | 
						|
  schedule:
 | 
						|
    - cron: "0 19,23,11,15 * * *"
 | 
						|
 | 
						|
  workflow_dispatch:
 | 
						|
 | 
						|
jobs:
 | 
						|
  sync-images:
 | 
						|
    if: github.repository == 'DaoCloud/public-image-mirror'
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    steps:
 | 
						|
      - name: Checkout repository
 | 
						|
        uses: actions/checkout@v2
 | 
						|
      - name: Start Proxy
 | 
						|
        env:
 | 
						|
          only_proxy: "m.daocloud.io"
 | 
						|
        run: |
 | 
						|
          wget https://github.com/wzshiming/bridge/releases/download/v0.7.13/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
 | 
						|
          nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
 | 
						|
      - name: Sync Images
 | 
						|
        env:
 | 
						|
          INCREMENTAL: "true"
 | 
						|
          QUICKLY: "true"
 | 
						|
          SYNC: "true"
 | 
						|
          PARALLET: "5"
 | 
						|
          http_proxy: socks5://127.0.0.1:8080
 | 
						|
          https_proxy: socks5://127.0.0.1:8080
 | 
						|
        run: |
 | 
						|
          ./hack/diff.sh
 |