action: support client_payload
This commit is contained in:
		
							parent
							
								
									045af45c56
								
							
						
					
					
						commit
						5eeb17a9fb
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		
							
								
								
									
										13
									
								
								.github/workflows/build-singbox-docker.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/build-singbox-docker.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -17,12 +17,17 @@ jobs:
 | 
			
		|||
        buildType: [full]
 | 
			
		||||
        distro: [alpine]
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    env:
 | 
			
		||||
      TAG: ${{ github.event.client_payload.tag || github.event.inputs.tag}}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Get Build Tags
 | 
			
		||||
        run: | 
 | 
			
		||||
          echo "Version: ${{env.TAG}}"
 | 
			
		||||
      - name: Checkout Source Code of 'SagerNet/sing-box'
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          repository: 'SagerNet/sing-box'
 | 
			
		||||
          ref: ${{ github.event.inputs.tag }}
 | 
			
		||||
          ref: ${{env.TAG}}
 | 
			
		||||
          submodules: true
 | 
			
		||||
      - name: Checkout Action Repo
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
| 
						 | 
				
			
			@ -78,13 +83,13 @@ jobs:
 | 
			
		|||
          if [[ "${{ matrix.distro }}" == "distroless" && "${{ matrix.buildType }}" == "full" ]]; then
 | 
			
		||||
            echo "latest=etnperlong/sing-box:distroless" >> $GITHUB_OUTPUT
 | 
			
		||||
          fi
 | 
			
		||||
          if [[ -z "${{ github.event.inputs.tag }}" ]]; then
 | 
			
		||||
          if [[ -z "${{env.TAG}}" ]]; then
 | 
			
		||||
            echo "versioned=etnperlong/sing-box:${{ github.ref_name }}" >> $GITHUB_OUTPUT
 | 
			
		||||
          else
 | 
			
		||||
            if [[ -n "${{ steps.dockerfile.outputs.tagpost }}" ]]; then
 | 
			
		||||
              echo "versioned=etnperlong/sing-box:${{ github.event.inputs.tag }}-${{ steps.dockerfile.outputs.tagpost }}" >> $GITHUB_OUTPUT
 | 
			
		||||
              echo "versioned=etnperlong/sing-box:${{env.TAG}}-${{ steps.dockerfile.outputs.tagpost }}" >> $GITHUB_OUTPUT
 | 
			
		||||
            else
 | 
			
		||||
              echo "versioned=etnperlong/sing-box:${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
 | 
			
		||||
              echo "versioned=etnperlong/sing-box:${{env.TAG}}" >> $GITHUB_OUTPUT
 | 
			
		||||
            fi
 | 
			
		||||
          fi
 | 
			
		||||
      - name: Build and release Docker images
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue