Skip to content

Commit 1b54ef3

Browse files
committed
Use action to handle testing
1 parent d8d0db1 commit 1b54ef3

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
supported-platform-matrix:
1010
name: Supported processor platforms
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
1212
outputs:
1313
platform: ${{ steps.supported-platform-matrix.outputs.platform }}
1414
steps:
@@ -17,7 +17,7 @@ jobs:
1717
uses: WyriHaximus/github-action-oci-image-supported-platforms@main
1818
lint-dockerfile:
1919
name: Lint Dockerfile
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-22.04
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: Lint Dockerfile
@@ -34,7 +34,7 @@ jobs:
3434
needs:
3535
- supported-platform-matrix
3636
- lint-dockerfile
37-
runs-on: ubuntu-latest
37+
runs-on: ubuntu-22.04
3838
steps:
3939
- name: Prepare
4040
run: |
@@ -66,7 +66,7 @@ jobs:
6666
needs:
6767
- supported-platform-matrix
6868
- build-docker-image
69-
runs-on: ubuntu-latest
69+
runs-on: ubuntu-22.04
7070
steps:
7171
- name: Prepare
7272
run: |
@@ -89,7 +89,7 @@ jobs:
8989
fail-fast: false
9090
matrix:
9191
platform: ${{ fromJson(needs.supported-platform-matrix.outputs.platform) }}
92-
runs-on: ubuntu-latest
92+
runs-on: ubuntu-22.04
9393
steps:
9494
- name: Prepare
9595
run: |
@@ -104,15 +104,18 @@ jobs:
104104
path: /tmp/docker-image
105105
- run: docker load --input /tmp/docker-image/docker_image-${{ env.PLATFORM_PAIR }}.tar
106106
- run: docker image ls -a
107-
- run: ./tests.sh "${DOCKER_IMAGE}:${{ env.PLATFORM_PAIR }}"
107+
- uses: WyriHaximus/github-action-testinfra@main
108+
with:
109+
image: ${{ env.DOCKER_IMAGE }}:${{ env.PLATFORM_PAIR }}
110+
flags: --platform="${{ matrix.platform }}"
108111
push-image:
109112
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
110113
name: Push
111114
needs:
112115
- supported-platform-matrix
113116
- scan-vulnerability
114117
- tests
115-
runs-on: ubuntu-latest
118+
runs-on: ubuntu-22.04
116119
services:
117120
registry:
118121
image: registry:2

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@ RUN (echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true"
99
apt-get update &&\
1010
apt-get upgrade -y &&\
1111
apt-get install -y curl wget make git unzip gnupg software-properties-common jq &&\
12+
1213
## TerraForm
1314
(wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null) &&\
1415
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint &&\
1516
(echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list) &&\
1617
apt-get update &&\
1718
apt-get install -y terraform &&\
19+
1820
## AWS CLI
1921
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "/tmp/awscliv2.zip" &&\
2022
unzip /tmp/awscliv2.zip &&\
2123
./aws/install &&\
2224
rm /tmp/* -Rf &&\
25+
26+
## Helm
2327
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
2428
chmod 700 get_helm.sh &&\
2529
./get_helm.sh &&\

0 commit comments

Comments
 (0)