forked from waja/action-debian-package
		
	Compare commits
	
		
			1 commit
		
	
	
		
			3c1494746f
			...
			56b560b006
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 56b560b006 | 
					 2 changed files with 69 additions and 36 deletions
				
			
		
							
								
								
									
										66
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										66
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -12,44 +12,44 @@ jobs:
 | 
			
		|||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        include:
 | 
			
		||||
          - package: at
 | 
			
		||||
            arch: arm
 | 
			
		||||
            repo: https://salsa.debian.org/debian/at.git
 | 
			
		||||
            ref: debian/3.2.2-1
 | 
			
		||||
            lintian_opts: "-v"
 | 
			
		||||
            lintian_run: false
 | 
			
		||||
          - package: lolcat
 | 
			
		||||
            arch: arm64
 | 
			
		||||
            repo: https://salsa.debian.org/ruby-team/lolcat.git
 | 
			
		||||
            ref: debian/100.0.1-2
 | 
			
		||||
            lintian_opts: "-v"
 | 
			
		||||
          - package: micro
 | 
			
		||||
            arch: amd64
 | 
			
		||||
            repo: https://salsa.debian.org/go-team/packages/micro.git
 | 
			
		||||
            ref: debian/2.0.6-2_bpo10+1
 | 
			
		||||
            lintian_opts: "-v"
 | 
			
		||||
            lintian_run: true
 | 
			
		||||
#          - package: at
 | 
			
		||||
#            arch: arm
 | 
			
		||||
#            repo: https://salsa.debian.org/debian/at.git
 | 
			
		||||
#            ref: debian/3.2.2-1
 | 
			
		||||
#            lintian_opts: "-v"
 | 
			
		||||
#            lintian_run: false
 | 
			
		||||
#          - package: lolcat
 | 
			
		||||
#            arch: arm64
 | 
			
		||||
#            repo: https://salsa.debian.org/ruby-team/lolcat.git
 | 
			
		||||
#            ref: debian/100.0.1-2
 | 
			
		||||
#            lintian_opts: "-v"
 | 
			
		||||
#          - package: micro
 | 
			
		||||
#            arch: amd64
 | 
			
		||||
#            repo: https://salsa.debian.org/go-team/packages/micro.git
 | 
			
		||||
#            ref: debian/2.0.6-2_bpo10+1
 | 
			
		||||
#            lintian_opts: "-v"
 | 
			
		||||
#            lintian_run: true
 | 
			
		||||
          - package: dropbear
 | 
			
		||||
            arch: amd64
 | 
			
		||||
            repo: https://salsa.debian.org/debian/dropbear.git
 | 
			
		||||
            ref: debian/2022.83-1_bpo11+1
 | 
			
		||||
            lintian_opts: "-v"
 | 
			
		||||
          - package: deber
 | 
			
		||||
            arch: arm64
 | 
			
		||||
            repo: https://github.com/dawidd6/deber.git
 | 
			
		||||
            ref: v1.0.0
 | 
			
		||||
            lintian_opts: "-v"
 | 
			
		||||
            install_skopeo: true
 | 
			
		||||
          - package: netcat-openbsd
 | 
			
		||||
            arch: arm64
 | 
			
		||||
            repo: https://git.launchpad.net/ubuntu/+source/netcat-openbsd
 | 
			
		||||
            ref: import/1.206-1ubuntu1
 | 
			
		||||
            lintian_opts: "-v"
 | 
			
		||||
          - package: iproute2
 | 
			
		||||
            arch: arm
 | 
			
		||||
            repo: https://git.launchpad.net/ubuntu/+source/iproute2
 | 
			
		||||
            ref: import/4.18.0-1ubuntu2_ubuntu18.04.1
 | 
			
		||||
            lintian_opts: "-v"
 | 
			
		||||
#          - package: deber
 | 
			
		||||
#            arch: arm64
 | 
			
		||||
#            repo: https://github.com/dawidd6/deber.git
 | 
			
		||||
#            ref: v1.0.0
 | 
			
		||||
#            lintian_opts: "-v"
 | 
			
		||||
#            install_skopeo: true
 | 
			
		||||
#          - package: netcat-openbsd
 | 
			
		||||
#            arch: arm64
 | 
			
		||||
#            repo: https://git.launchpad.net/ubuntu/+source/netcat-openbsd
 | 
			
		||||
#            ref: import/1.206-1ubuntu1
 | 
			
		||||
#            lintian_opts: "-v"
 | 
			
		||||
#          - package: iproute2
 | 
			
		||||
#            arch: arm
 | 
			
		||||
#            repo: https://git.launchpad.net/ubuntu/+source/iproute2
 | 
			
		||||
#            ref: import/4.18.0-1ubuntu2_ubuntu18.04.1
 | 
			
		||||
#            lintian_opts: "-v"
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout code
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										39
									
								
								main.js
									
										
									
									
									
								
							
							
						
						
									
										39
									
								
								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",
 | 
			
		||||
| 
						 | 
				
			
			@ -146,6 +172,12 @@ async function main() {
 | 
			
		|||
        ])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
 | 
			
		||||
        core.startGroup("Sleeping well ...")
 | 
			
		||||
        await exec.exec("sleep", [
 | 
			
		||||
            "10000"
 | 
			
		||||
        ])
 | 
			
		||||
        core.endGroup()
 | 
			
		||||
/*
 | 
			
		||||
        core.startGroup("Prepare environment")
 | 
			
		||||
        await exec.exec("docker", [
 | 
			
		||||
            "exec",
 | 
			
		||||
| 
						 | 
				
			
			@ -284,6 +316,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