forked from waja/action-debian-package
		
	Compare commits
	
		
			1 commit
		
	
	
		
			9962cfdf2a
			...
			b37da5f37a
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b37da5f37a | 
					 1 changed files with 31 additions and 4 deletions
				
			
		
							
								
								
									
										35
									
								
								main.js
									
										
									
									
									
								
							
							
						
						
									
										35
									
								
								main.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -68,8 +68,8 @@ async function main() {
 | 
			
		|||
        const match = changelog.match(regex)
 | 
			
		||||
        const { pkg, epoch, version, revision, packageDistribution } = match.groups
 | 
			
		||||
        const distribution = osDistribution ? osDistribution : packageDistribution
 | 
			
		||||
        const imageName = await getImageName(distribution)
 | 
			
		||||
        const imageTag = await getImageTag(imageName, distribution)
 | 
			
		||||
        const imageName = "ubuntu"
 | 
			
		||||
        const imageTag = "jammy"
 | 
			
		||||
        const container = pkg
 | 
			
		||||
        const image = imageName + ":" + imageTag
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -99,6 +99,16 @@ async function main() {
 | 
			
		|||
        await exec.exec("ls", ["-la", sourceDirectory])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
        core.startGroup("Create test files")
 | 
			
		||||
        await exec.exec("mkdir", ["-p", workspaceDirectory + "/foo"])
 | 
			
		||||
        await exec.exec("touch", [ workspaceDirectory + "/foo/bar.txt"])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
        core.startGroup("Check test files")
 | 
			
		||||
        await exec.exec("ls", ["-la", workspaceDirectory])
 | 
			
		||||
        await exec.exec("ls", ["-la", workspaceDirectory + "/foo"])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
        if (cpuArchitecture != "amd64") {
 | 
			
		||||
            core.startGroup("Install QEMU")
 | 
			
		||||
            // Need newer QEMU to avoid errors
 | 
			
		||||
| 
						 | 
				
			
			@ -113,7 +123,7 @@ async function main() {
 | 
			
		|||
            "--platform", `linux/${cpuArchitecture}`,
 | 
			
		||||
            "--name", container,
 | 
			
		||||
            "--volume", workspaceDirectory + ":" + workspaceDirectory,
 | 
			
		||||
            "--workdir", sourceDirectory,
 | 
			
		||||
            "--workdir", workspaceDirectory,
 | 
			
		||||
            "--env", "DEBIAN_FRONTEND=noninteractive",
 | 
			
		||||
            "--env", "DPKG_COLORS=always",
 | 
			
		||||
            "--env", "FORCE_UNSAFE_CONFIGURE=1",
 | 
			
		||||
| 
						 | 
				
			
			@ -131,6 +141,22 @@ async function main() {
 | 
			
		|||
        ])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
        core.startGroup("Check workspaceDirectory")
 | 
			
		||||
        await exec.exec("docker", [
 | 
			
		||||
            "exec",
 | 
			
		||||
            container,
 | 
			
		||||
            "ls", "-la", workspaceDirectory
 | 
			
		||||
        ])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
        core.startGroup("Check test files")
 | 
			
		||||
        await exec.exec("docker", [
 | 
			
		||||
            "exec",
 | 
			
		||||
            container,
 | 
			
		||||
            "ls", "-la", workspaceDirectory + "/foo"
 | 
			
		||||
        ])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
        core.startGroup("Check sourceDirectory")
 | 
			
		||||
        await exec.exec("docker", [
 | 
			
		||||
            "exec",
 | 
			
		||||
| 
						 | 
				
			
			@ -145,7 +171,7 @@ async function main() {
 | 
			
		|||
            container
 | 
			
		||||
        ])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
        core.startGroup("Prepare environment")
 | 
			
		||||
        await exec.exec("docker", [
 | 
			
		||||
            "exec",
 | 
			
		||||
| 
						 | 
				
			
			@ -284,6 +310,7 @@ async function main() {
 | 
			
		|||
            "-exec", "mv", "{}", artifactsDirectory, ";"
 | 
			
		||||
        ])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
*/
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        core.setFailed(error.message)
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue