Adding a way to enable/disable lintian checks

This commit is contained in:
Jan Wagner 2022-10-28 11:22:24 +02:00 committed by Dawid Dziurla
parent b43ffb1f6d
commit 7bec10b9ba
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B
3 changed files with 25 additions and 15 deletions

View file

@ -17,6 +17,7 @@ jobs:
repo: https://salsa.debian.org/debian/at.git repo: https://salsa.debian.org/debian/at.git
ref: debian/3.1.23-1 ref: debian/3.1.23-1
lintian_opts: "-v" lintian_opts: "-v"
lintian_run: false
- package: lolcat - package: lolcat
arch: arm64 arch: arm64
repo: https://salsa.debian.org/ruby-team/lolcat.git repo: https://salsa.debian.org/ruby-team/lolcat.git
@ -27,6 +28,7 @@ jobs:
repo: https://salsa.debian.org/go-team/packages/micro.git repo: https://salsa.debian.org/go-team/packages/micro.git
ref: debian/2.0.6-2_bpo10+1 ref: debian/2.0.6-2_bpo10+1
lintian_opts: "-v" lintian_opts: "-v"
lintian_run: true
- package: dropbear - package: dropbear
arch: amd64 arch: amd64
repo: https://salsa.debian.org/debian/dropbear.git repo: https://salsa.debian.org/debian/dropbear.git
@ -59,6 +61,7 @@ jobs:
source_directory: ${{matrix.package}} source_directory: ${{matrix.package}}
artifacts_directory: artifacts artifacts_directory: artifacts
lintian_opts: ${{matrix.lintian_opts}} lintian_opts: ${{matrix.lintian_opts}}
lintian_run: ${{matrix.lintian_run || false }}
- name: Check files - name: Check files
run: | run: |
ls -lh artifacts/${{matrix.package}}*.* ls -lh artifacts/${{matrix.package}}*.*

View file

@ -23,6 +23,10 @@ inputs:
description: Command line parameters provided to 'lintian' description: Command line parameters provided to 'lintian'
required: false required: false
default: "" default: ""
lintian_run:
description: Run lintian checks
required: false
default: false
runs: runs:
using: node16 using: node16
main: main.js main: main.js

View file

@ -39,6 +39,7 @@ async function main() {
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./" const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
const osDistribution = core.getInput("os_distribution") || "" const osDistribution = core.getInput("os_distribution") || ""
const lintianOpts = core.getInput("lintian_opts") || "" const lintianOpts = core.getInput("lintian_opts") || ""
const lintianRun = core.getBooleanInput('lintian_run') || false
const workspaceDirectory = process.cwd() const workspaceDirectory = process.cwd()
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory) const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
@ -72,7 +73,8 @@ async function main() {
sourceDirectory: sourceDirectory, sourceDirectory: sourceDirectory,
buildDirectory: buildDirectory, buildDirectory: buildDirectory,
artifactsDirectory: artifactsDirectory, artifactsDirectory: artifactsDirectory,
lintianOpts: lintianOpts lintianOpts: lintianOpts,
lintianRun: lintianRun
} }
console.log(details) console.log(details)
core.endGroup() core.endGroup()
@ -187,6 +189,7 @@ async function main() {
]) ])
core.endGroup() core.endGroup()
if (lintianRun){
core.startGroup("Run static analysis") core.startGroup("Run static analysis")
await exec.exec("docker", [ await exec.exec("docker", [
"exec", "exec",
@ -198,9 +201,9 @@ async function main() {
"-type", "f", "-type", "f",
"-print", "-print",
"-exec", "lintian", lintianOpts, "{}", "\+" "-exec", "lintian", lintianOpts, "{}", "\+"
]) ])
core.endGroup() core.endGroup()
}
core.startGroup("Install built packages") core.startGroup("Install built packages")
await exec.exec("docker", [ await exec.exec("docker", [