Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/github-action-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Install
on: [push]
jobs:
install-ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: [
"ubuntu:20.04",
"ubuntu:18.04",
"ubuntu:16.04",
"ubuntu:14.04",
Comment on lines +10 to +13
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to remove these hard-coded?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYM? I added them in the purpose of covering the supported versions. You can put w/e container image you want in here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot maintain these values every time Ubuntu releases a new version. Can we fetch all the versions supported by Ubuntu?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to get all the supported versions it means to fetch somehow all the active LTS versions. https://endoflife.date/ubuntu
Umm, it's possible, but it'll be complex.
I can add the ubuntu:latest tag to at least be informed about any new version that becomes unsupported.

How do you currently maintain the releases? Do you automatically add/remove versions according to their EOL (active support/security support)?
If so, it should work with the same scripts/API.
Otherwise, you might want to open another issue to support those values automatically, it will require more time.

]

container:
image: ${{ matrix.image }}

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- run: ./install_deb.sh

install-debian:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: [
"debian:10",
"debian:9"
]

container:
image: ${{ matrix.image }}

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- run: ./install_deb.sh
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ $ sudo apt-get update
$ sudo apt-get install trivy
```

CODE_NAME: wheezy, jessie, stretch, buster, trusty, xenial, bionic
`CODE_NAME` can be one of the following supported versions

code name | version
--------- | -------
focal | Ubuntu 20.04
bionic | Ubuntu 18.04
xenial | Ubuntu 16.04
trusty | Ubuntu 14.04
buster | Debian 10
stretch | Debian 9
jessie | Debian 8
wheezy | Debian 7

## RHEL/CentOS

Expand Down
19 changes: 19 additions & 0 deletions install_deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -o nounset
set -o pipefail
set -o errexit
set -o xtrace

# Install prerequisites
apt-get update
apt-get install -y wget gnupg lsb-release


# Install script
apt-get install -y apt-transport-https
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | tee -a /etc/apt/sources.list
apt-get update
apt-get install -y trivy