Skip to content

Commit

Permalink
Use action to handle testing
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Feb 12, 2025
1 parent d8d0db1 commit 26a87d6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
supported-platform-matrix:
name: Supported processor platforms
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
platform: ${{ steps.supported-platform-matrix.outputs.platform }}
steps:
Expand All @@ -17,7 +17,7 @@ jobs:
uses: WyriHaximus/github-action-oci-image-supported-platforms@main
lint-dockerfile:
name: Lint Dockerfile
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Lint Dockerfile
Expand All @@ -34,7 +34,7 @@ jobs:
needs:
- supported-platform-matrix
- lint-dockerfile
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Prepare
run: |
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
needs:
- supported-platform-matrix
- build-docker-image
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Prepare
run: |
Expand All @@ -89,7 +89,7 @@ jobs:
fail-fast: false
matrix:
platform: ${{ fromJson(needs.supported-platform-matrix.outputs.platform) }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Prepare
run: |
Expand All @@ -104,15 +104,18 @@ jobs:
path: /tmp/docker-image
- run: docker load --input /tmp/docker-image/docker_image-${{ env.PLATFORM_PAIR }}.tar
- run: docker image ls -a
- run: ./tests.sh "${DOCKER_IMAGE}:${{ env.PLATFORM_PAIR }}"
- uses: WyriHaximus/github-action-testinfra@main
with:
image: ${{ env.DOCKER_IMAGE }}:${{ env.PLATFORM_PAIR }}
flags: --platform="${{ matrix.platform }}"
push-image:
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/main'
name: Push
needs:
- supported-platform-matrix
- scan-vulnerability
- tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
registry:
image: registry:2
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ USER root

# hadolint ignore=DL3008,DL3047,DL3009,DL4006,DL3015,DL4001
RUN (echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true";};' | tee /etc/apt/apt.conf.d/clean) &&\
apt-get update &&\
apt-get upgrade -y &&\
# apt-get update &&\
# apt-get upgrade -y &&\
apt-get install -y curl wget make git unzip gnupg software-properties-common jq &&\
## TerraForm
(wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null) &&\
Expand Down

0 comments on commit 26a87d6

Please sign in to comment.