mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			39 lines
		
	
	
		
			659 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			659 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
TYP=$1
 | 
						|
 | 
						|
. $(dirname $0)/util
 | 
						|
set -e
 | 
						|
 | 
						|
usage() {
 | 
						|
  echo "usage: ./hack/build_ci_first_pass <binaries>"
 | 
						|
  exit 1
 | 
						|
}
 | 
						|
 | 
						|
if [ -z "$TYP" ]; then
 | 
						|
  usage
 | 
						|
fi
 | 
						|
 | 
						|
importCacheFlags=""
 | 
						|
exportCacheFlags=""
 | 
						|
if [ "$GITHUB_ACTIONS" = "true" ]; then
 | 
						|
  if [ -n "$cacheRefFrom" ]; then
 | 
						|
    importCacheFlags="--cache-from=type=local,src=$cacheRefFrom"
 | 
						|
  fi
 | 
						|
  if [ -n "$cacheRefTo" ]; then
 | 
						|
    exportCacheFlags="--cache-to=type=local,dest=$cacheRefTo"
 | 
						|
  fi
 | 
						|
fi
 | 
						|
 | 
						|
case $TYP in
 | 
						|
  "binaries")
 | 
						|
    buildxCmd build $importCacheFlags $exportCacheFlags \
 | 
						|
      --target "binaries" \
 | 
						|
      $currentcontext
 | 
						|
    ;;
 | 
						|
  *)
 | 
						|
    echo >&2 "Unknown type $TYP"
 | 
						|
    exit 1
 | 
						|
    ;;
 | 
						|
esac
 |