mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
chore: Add docker image tests - container-structure-test-config and dive-ci (#365)
This commit is contained in:
parent
f1822ed810
commit
4874cfe42e
4 changed files with 95 additions and 6 deletions
21
.github/workflows/build-image-test.yaml
vendored
21
.github/workflows/build-image-test.yaml
vendored
|
|
@ -2,10 +2,12 @@ name: "Build Dockerfile if changed and run smoke tests"
|
|||
|
||||
on: [pull_request]
|
||||
|
||||
env:
|
||||
IMAGE_TAG: pr-test
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
|
@ -28,4 +30,19 @@ jobs:
|
|||
platforms: linux/amd64
|
||||
push: false
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:pr-test
|
||||
ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
|
||||
|
||||
- name: Run structure tests
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
uses: plexsystems/container-structure-test-action@v0.1.0
|
||||
with:
|
||||
image: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
|
||||
config: .github/.container-structure-test-config.yaml
|
||||
|
||||
- name: Dive - check image for waste files
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
uses: MaxymVlasov/dive-action@v0.1.0
|
||||
with:
|
||||
image: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
|
||||
config-file: ${{ github.workspace }}/.github/.dive-ci.yaml
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue