Skip to content

Container Image Testing #75

Container Image Testing

Container Image Testing #75

name: Container Image Testing
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: # For on demand runs
schedule:
- cron: 0 0 * * * # Scheduled run every day at midnight
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Build the Docker image (With ECR Ratelimit Fix)
uses: nick-fields/[email protected]
with:
command: docker build . --file Dockerfile --tag container-image
retry_wait_seconds: 30
max_attempts: 3
timeout_minutes: 5
- name: Download CST Testing Suite
run: curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && chmod +x container-structure-test-linux-amd64 && sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
- name: Run CST Tests
run: container-structure-test test --image container-image:latest --config cst_config.yaml