mirror of
				https://github.com/DaoCloud/public-image-mirror.git
				synced 2025-11-04 00:16:14 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: "Check"
 | 
						|
on:
 | 
						|
  workflow_dispatch:
 | 
						|
 | 
						|
  schedule:
 | 
						|
    - cron: "0 3 * * *"
 | 
						|
 | 
						|
jobs:
 | 
						|
  check:
 | 
						|
    if: github.repository == 'DaoCloud/public-image-mirror'
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    steps:
 | 
						|
      - 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: Check
 | 
						|
        env:
 | 
						|
          INCREMENTAL: "true"
 | 
						|
          QUICKLY: "true"
 | 
						|
          PARALLET: "10"
 | 
						|
          http_proxy: socks5://127.0.0.1:8080
 | 
						|
          https_proxy: socks5://127.0.0.1:8080
 | 
						|
        run: |
 | 
						|
          ./hack/diff.sh
 | 
						|
      - name: Update badge
 | 
						|
        env:
 | 
						|
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
						|
          BADGE_PREFIX: "git://${{ github.repository }}/gh-pages"
 | 
						|
          QUICKLY: "true"  
 | 
						|
        run: |
 | 
						|
          wget https://github.com/wzshiming/putingh/releases/download/v0.6.3/putingh_linux_amd64 -O /usr/local/bin/putingh && chmod +x /usr/local/bin/putingh
 | 
						|
          ./hack/badge.sh
 | 
						|
          GH_TOKEN="${GH_TOKEN}" putingh "${BADGE_PREFIX}/daocloud-sync-badge.svg" badge.svg
 | 
						|
          GH_TOKEN="${GH_TOKEN}" putingh "${BADGE_PREFIX}/daocloud-sync.log" sync.log
 | 
						|
      - name: Stats the number of not sync images
 | 
						|
        run: |
 | 
						|
          ./hack/stats-not-sync.sh sync.log
 |