Merge pull request #77 from waja/fix_skopeo
Some checks failed
Test Action / test (amd64, -v, dropbear, debian/2022.83-1_bpo11+1, https://salsa.debian.org/debian/dropbear.git) (push) Failing after 2m36s
Test Action / test (amd64, -v, true, micro, debian/2.0.6-2_bpo10+1, https://salsa.debian.org/go-team/packages/micro.git) (push) Failing after 3m23s
Test Action / test (arm, -v, false, at, debian/3.2.2-1, https://salsa.debian.org/debian/at.git) (push) Failing after 34s
Test Action / test (arm, -v, iproute2, import/4.18.0-1ubuntu2_ubuntu18.04.1, https://git.launchpad.net/ubuntu/+source/iproute2) (push) Failing after 38s
Test Action / test (arm64, -v, lolcat, debian/100.0.1-2, https://salsa.debian.org/ruby-team/lolcat.git) (push) Failing after 37s
Test Action / test (arm64, -v, netcat-openbsd, import/1.206-1ubuntu1, https://git.launchpad.net/ubuntu/+source/netcat-openbsd) (push) Failing after 37s
Test Action / test (arm64, true, -v, deber, v1.0.0, https://github.com/dawidd6/deber.git) (push) Failing after 12s

Adding installation of skopeo
This commit is contained in:
Dawid Dziurla 2024-01-06 13:58:39 +01:00 committed by GitHub
commit c7f4c07ff6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 1 deletions

View file

@ -39,6 +39,7 @@ jobs:
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
@ -52,8 +53,14 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Clone repo
run: git clone --depth=1 ${{matrix.repo}} -b ${{matrix.ref}} ${{matrix.package}}
- name: Remove skopeo (for testing installation)
if: ${{matrix.install_skopeo}}
run: sudo apt-get remove -y skopeo
- name: Test run
uses: ./
with:
@ -62,6 +69,7 @@ jobs:
artifacts_directory: artifacts
lintian_opts: ${{matrix.lintian_opts}}
lintian_run: ${{matrix.lintian_run || false}}
- name: Check files
run: |
ls -lh artifacts/${{matrix.package}}*.*

16
main.js
View file

@ -1,5 +1,6 @@
const core = require("@actions/core")
const exec = require("@actions/exec")
const io = require('@actions/io')
const firstline = require("firstline")
const path = require("path")
const fs = require("fs")
@ -16,6 +17,21 @@ function getImageTag(imageName, distribution) {
}
async function getImageName(distribution) {
const skopeoPath = await io.which('skopeo', false)
if (!skopeoPath) {
core.startGroup("Install skopeo")
await exec.exec("sudo", [
"apt-get",
"update"
])
await exec.exec("sudo", [
"apt-get",
"-y",
"install",
"skopeo"
])
core.endGroup()
}
const tag = getImageTag("", distribution)
for (const image of ["debian", "ubuntu"]) {
try {