main: update
- exit if any variable is undefined - hopefully resolve the issue with directory mounting
This commit is contained in:
		
							parent
							
								
									9e6ff7644d
								
							
						
					
					
						commit
						ae0c8188ee
					
				
					 1 changed files with 9 additions and 6 deletions
				
			
		
							
								
								
									
										15
									
								
								main.sh
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								main.sh
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,11 +1,14 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
set -eu
 | 
			
		||||
 | 
			
		||||
directory="$PWD/${INPUT_DIRECTORY}"
 | 
			
		||||
directory="${INPUT_DIRECTORY:-}"
 | 
			
		||||
os="${INPUT_OS:-"debian"}"
 | 
			
		||||
 | 
			
		||||
cd "$directory"
 | 
			
		||||
directory_runner="$RUNNER_WORKSPACE/$directory"
 | 
			
		||||
directory_container="$GITHUB_WORKSPACE/$directory"
 | 
			
		||||
 | 
			
		||||
cd "$directory_container"
 | 
			
		||||
 | 
			
		||||
package="$(dpkg-parsechangelog -S Source)"
 | 
			
		||||
version="$(dpkg-parsechangelog -S Version)"
 | 
			
		||||
| 
						 | 
				
			
			@ -17,8 +20,8 @@ image="$os:$distribution"
 | 
			
		|||
docker create \
 | 
			
		||||
    --tty \
 | 
			
		||||
    --name "$container" \
 | 
			
		||||
    --volume "$directory":"$directory" \
 | 
			
		||||
    --workdir "$directory" \
 | 
			
		||||
    --volume "$directory_runner":"$directory_container" \
 | 
			
		||||
    --workdir "$directory_container" \
 | 
			
		||||
    "$image" \
 | 
			
		||||
    sleep inf
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -40,7 +43,7 @@ docker exec \
 | 
			
		|||
 | 
			
		||||
docker exec \
 | 
			
		||||
    "$container" \
 | 
			
		||||
    apt-get build-dep ./
 | 
			
		||||
    apt-get build-dep "$directory_container"
 | 
			
		||||
 | 
			
		||||
docker exec \
 | 
			
		||||
    "$container" \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue