├── CHANGELOG.md
├── .vscode
└── extensions.json
├── .github
├── CODEOWNERS
├── FUNDING.yml
├── workflows
│ ├── sync-labels.yml
│ ├── pr-title-checker.yml
│ ├── label-checker.yml
│ ├── update-changelog.yml
│ ├── release-drafter.yml
│ └── ci.yml
├── labels.yml
└── release-drafter-config.yml
├── .gitignore
├── .envrc
├── .hadolint.yml
├── .devcontainer
└── devcontainer.json
├── .dockerignore
├── structure-tests.yaml
├── renovate.json
├── devenv.nix
├── entrypoint.sh
├── lefthook.yml
├── .editorconfig
├── devenv.yaml
├── action.yml
├── Taskfile.yml
├── Dockerfile
├── LICENSE
├── devenv.lock
├── README.md
├── CONTRIBUTING.md
└── tags
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["task.vscode-task", "mkhl.direnv"]
3 | }
4 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # This is a CODEOWNERS file.
2 | # Each line is a file pattern followed by one or more owners.
3 |
4 | * @brpaz
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .devbox
2 | .env
3 | # Devenv
4 | .devenv*
5 | devenv.local.nix
6 |
7 | # direnv
8 | .direnv
9 |
10 | # pre-commit
11 | .pre-commit-config.yaml
12 |
13 | tags
14 |
--------------------------------------------------------------------------------
/.envrc:
--------------------------------------------------------------------------------
1 | source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
2 |
3 | use devenv
4 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # https://help.github.com/en/articles/displaying-a-sponsor-button-in-your-repository
2 | github: brpaz
3 | patreon: brpaz
4 | custom: https://www.buymeacoffee.com/Z1Bu6asGV
5 |
--------------------------------------------------------------------------------
/.hadolint.yml:
--------------------------------------------------------------------------------
1 | # Hadolint configuration file
2 |
3 | # configure ignore rules
4 | # see https://github.com/hadolint/hadolint#rules for a list of available rules.
5 | failure-threshold: error
6 | ignored: []
7 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "customizations": {
3 | "vscode": {
4 | "extensions": [
5 | "mkhl.direnv"
6 | ]
7 | }
8 | },
9 | "image": "ghcr.io/cachix/devenv:latest",
10 | "overrideCommand": false
11 | }
12 |
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .github
2 | .devcontainer
3 | .vscode
4 | .lefthook
5 | .commitlintrc.json
6 | .editorconfig
7 | .envrc
8 | .env
9 | .hadolint.yaml
10 | CONTRIBUTING.md
11 | Dockerfile
12 | lefthook.yaml
13 | structure-tests.yaml
14 | Taskfile.yml
15 |
--------------------------------------------------------------------------------
/structure-tests.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: 2.0.0
2 |
3 | metadataTest:
4 | entrypoint: ["/entrypoint.sh"]
5 |
6 | commandTests:
7 | - name: "Check Container structure test is installed"
8 | command: container-structure-test
9 | args: [version]
10 | exitCode: 0
11 | expectedOutput: ["1.19.3"]
12 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": [
4 | "config:recommended"
5 | ],
6 | "prHourlyLimit": 5,
7 | "prConcurrentLimit": 20,
8 | "labels": [
9 | "dependencies"
10 | ],
11 | "reviewers": [
12 | "brpaz"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/devenv.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, config, inputs, ... }:
2 |
3 | {
4 | # https://devenv.sh/packages/
5 | packages = [
6 | pkgs.hadolint
7 | pkgs.shellcheck
8 | pkgs.container-structure-test
9 | pkgs.lefthook
10 | pkgs.docker
11 | pkgs.commitlint-rs
12 | ];
13 |
14 | enterShell = ''
15 | lefthook install
16 | '';
17 | }
18 |
--------------------------------------------------------------------------------
/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -l
2 |
3 | set -e
4 |
5 | if [ -z "$INPUT_IMAGE" ]; then
6 | echo "Input image is required"
7 | exit 1
8 | fi
9 |
10 | if [ -z "$INPUT_CONFIGFILE" ]; then
11 | echo "Input config file is required"
12 | exit 1
13 | fi
14 |
15 | container-structure-test test --image "$INPUT_IMAGE" --config "$INPUT_CONFIGFILE"
16 |
--------------------------------------------------------------------------------
/lefthook.yml:
--------------------------------------------------------------------------------
1 | # EXAMPLE USAGE:
2 | #
3 | # Refer for explanation to following link:
4 | # https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
5 | #
6 |
7 | pre-commit:
8 | parallel: true
9 | commands:
10 | lint:
11 | run: task lint
12 |
13 | commit-msg:
14 | commands:
15 | lint-commit-msg:
16 | run: commitlint
17 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | trim_trailing_whitespace = true
7 | insert_final_newline = true
8 | max_line_length = 120
9 |
10 | [*.md]
11 | indent_style = space
12 | indent_size = 4
13 | trim_trailing_whitespace = false
14 |
15 | [Dockerfile]
16 | indent_style = space
17 | indent_size = 4
18 |
19 | [*.{yml,yaml}]
20 | indent_style = space
21 | indent_size = 2
22 |
--------------------------------------------------------------------------------
/devenv.yaml:
--------------------------------------------------------------------------------
1 | # yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
2 | inputs:
3 | nixpkgs:
4 | url: github:cachix/devenv-nixpkgs/rolling
5 |
6 | # If you're using non-OSS software, you can set allowUnfree to true.
7 | # allowUnfree: true
8 |
9 | # If you're willing to use a package that's vulnerable
10 | # permittedInsecurePackages:
11 | # - "openssl-1.1.1w"
12 |
13 | # If you have more than one devenv you can merge them
14 | #imports:
15 | # - ./backend
16 |
--------------------------------------------------------------------------------
/.github/workflows/sync-labels.yml:
--------------------------------------------------------------------------------
1 | name: Sync labels
2 | on:
3 | push:
4 | branches:
5 | - main
6 | paths:
7 | - .github/labels.yml
8 | workflow_dispatch:
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 | permissions:
13 | contents: write
14 | pull-requests: write
15 | steps:
16 | - uses: actions/checkout@v4
17 | - uses: micnncim/action-label-syncer@v1
18 | env:
19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 | with:
21 | manifest: .github/labels.yml
22 |
--------------------------------------------------------------------------------
/action.yml:
--------------------------------------------------------------------------------
1 | name: "Container Structure Tests"
2 | description: |
3 | Action that leverages Google´s Container Structure test
4 | to run unit tests on your container images'
5 | author: "Bruno Paz"
6 | inputs:
7 | image:
8 | description: "The Docker image to test"
9 | required: true
10 | configFile:
11 | description: "Path to the config file"
12 | default: "structure-tests.yaml"
13 | runs:
14 | using: "docker"
15 | image: "Dockerfile"
16 | args:
17 | - ${{ inputs.image }}
18 | - ${{ inputs.configFile }}
19 | branding:
20 | icon: "package"
21 | color: "blue"
22 |
--------------------------------------------------------------------------------
/.github/labels.yml:
--------------------------------------------------------------------------------
1 | - name: bug
2 | description: Something isn't working
3 | color: d73a4a
4 | - name: documentation
5 | description: Improvements or additions to documentation
6 | color: 0075ca
7 | - name: duplicate
8 | description: This issue or pull request already exists
9 | color: cfd3d7
10 | - name: security
11 | description: Security updates
12 | color: a31f34
13 | - name: feature
14 | description: New feature
15 | color: 0e8a16
16 | - name: enhancement
17 | description: Enhancement on existing Feature
18 | color: 0e8a16
19 | - name: chore
20 | description: Maintenance
21 | color: F6EE8F
22 |
--------------------------------------------------------------------------------
/.github/workflows/pr-title-checker.yml:
--------------------------------------------------------------------------------
1 | name: Check PR title
2 |
3 | on:
4 | pull_request:
5 | types:
6 | - opened
7 | - reopened
8 | - edited
9 | - synchronize
10 |
11 | concurrency:
12 | group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13 | cancel-in-progress: true
14 |
15 | permissions:
16 | contents: read
17 | statuses: write
18 |
19 | jobs:
20 | title-checker:
21 | name: Check PR title
22 | runs-on: ubuntu-latest
23 |
24 | steps:
25 | - uses: aslafy-z/conventional-pr-title-action@v3
26 | env:
27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 |
--------------------------------------------------------------------------------
/Taskfile.yml:
--------------------------------------------------------------------------------
1 | version: "3"
2 |
3 | env:
4 | TEST_IMAGE_TAG: "action-structure-tests:local-dev"
5 |
6 | tasks:
7 | default:
8 | cmds:
9 | - task -l
10 |
11 | lint:
12 | desc: "Runs hadolint against application dockerfile"
13 | cmds:
14 | - hadolint Dockerfile
15 |
16 | build:
17 | desc: "Builds the docker image"
18 | cmds:
19 | - docker build . -t {{ .TEST_IMAGE_TAG }}
20 |
21 | test:
22 | desc: "Runs a test in the image"
23 | deps:
24 | - build
25 | cmds:
26 | - |
27 | container-structure-test test \
28 | --image {{ .TEST_IMAGE_TAG }} \
29 | --config structure-tests.yaml
30 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:3.21.3
2 |
3 | ARG STRUCTURE_TEST_VERSION=1.19.3
4 | ENV STRUCTURE_TEST_VERSION=${STRUCTURE_TEST_VERSION}
5 | ENV DOWNLOAD_URL=https://github.com/GoogleContainerTools/container-structure-test/releases/download/v${STRUCTURE_TEST_VERSION}/container-structure-test-linux-amd64
6 |
7 | RUN apk add --no-cache curl
8 |
9 | RUN curl -LO ${DOWNLOAD_URL} \
10 | && chmod +x container-structure-test-linux-amd64 \
11 | && mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test \
12 | && container-structure-test version
13 |
14 | COPY entrypoint.sh /entrypoint.sh
15 |
16 | RUN chmod +x /entrypoint.sh
17 |
18 | ENTRYPOINT ["/entrypoint.sh"]
19 |
--------------------------------------------------------------------------------
/.github/workflows/label-checker.yml:
--------------------------------------------------------------------------------
1 | name: Label Checker
2 |
3 | on:
4 | pull_request:
5 | types:
6 | - opened
7 | - synchronize
8 | - reopened
9 | - labeled
10 | - unlabeled
11 |
12 | concurrency:
13 | group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
14 | cancel-in-progress: true
15 |
16 | permissions:
17 | contents: read
18 | pull-requests: read
19 | checks: write
20 |
21 | jobs:
22 | check_cc_labels:
23 | name: Check conventional commits labels
24 | runs-on: "ubuntu-latest"
25 | steps:
26 | - uses: danielchabr/pr-labels-checker@v3.3
27 | with:
28 | hasSome: feature,fix,changed,deprecated,security,docs,dependencies
29 | githubToken: ${{ secrets.GITHUB_TOKEN }}
30 |
--------------------------------------------------------------------------------
/.github/workflows/update-changelog.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | concurrency:
8 | group: ${{ github.workflow }}-${{ github.ref }}
9 | cancel-in-progress: true
10 |
11 | jobs:
12 | changelog:
13 | name: Update Changelog
14 | runs-on: ubuntu-latest
15 | permissions:
16 | contents: write
17 | steps:
18 | - name: Checkout
19 | uses: actions/checkout@v4
20 |
21 | - name: Update Changelog
22 | uses: stefanzweifel/changelog-updater-action@v1
23 | with:
24 | latest-version: ${{ github.event.release.tag_name }}
25 | release-notes: ${{ github.event.release.body }}
26 |
27 | - name: Commit release files
28 | uses: stefanzweifel/git-auto-commit-action@v5
29 | with:
30 | branch: main
31 | commit_message: "chore(release): [skip-ci] ${{ github.event.release.tag_name }}"
32 | file_pattern: CHANGELOG.md
33 |
--------------------------------------------------------------------------------
/.github/workflows/release-drafter.yml:
--------------------------------------------------------------------------------
1 | name: Release Drafter
2 |
3 | on:
4 | push:
5 | # branches to consider in the event; optional, defaults to all
6 | branches:
7 | - main
8 | - master
9 | # pull_request event is required only for autolabeler
10 | pull_request:
11 | # Only following types are handled by the action, but one can default to all as well
12 | types: [opened, reopened, synchronize]
13 |
14 | jobs:
15 | update_release_draft:
16 | permissions:
17 | # write permission is required to create a github release
18 | contents: write
19 | # write permission is required for autolabeler
20 | # otherwise, read permission is required at least
21 | pull-requests: write
22 | runs-on: ubuntu-latest
23 | steps:
24 | - uses: release-drafter/release-drafter@v6
25 | with:
26 | config-name: release-drafter-config.yml
27 | env:
28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | The MIT License (MIT)
3 |
4 | Copyright (c) Bruno Paz
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: "CI"
2 | on:
3 | push:
4 | branches:
5 | - master
6 | pull_request:
7 | release:
8 | types: [published]
9 |
10 | env:
11 | TEST_IMAGE_TAG: structure-tests-action:${{ github.sha }}
12 |
13 | jobs:
14 | lint:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@v4
18 |
19 | - name: Lint Dockerfile
20 | uses: hadolint/hadolint-action@v3.1.0
21 | with:
22 | dockerfile: Dockerfile
23 |
24 | test:
25 | name: Test
26 | runs-on: ubuntu-latest
27 | needs: [lint]
28 | steps:
29 | - name: Checkout
30 | uses: actions/checkout@v4
31 |
32 | - name: Set up QEMU
33 | uses: docker/setup-qemu-action@v3
34 |
35 | - name: Set up Docker Buildx
36 | uses: docker/setup-buildx-action@v3
37 |
38 | - name: Build test image
39 | uses: docker/build-push-action@v6
40 | with:
41 | context: .
42 | load: true
43 | tags: ${{ env.TEST_IMAGE_TAG }}
44 |
45 | - name: Test
46 | uses: ./
47 | with:
48 | image: ${{ env.TEST_IMAGE_TAG }}
49 | configFile: structure-tests.yaml
50 |
--------------------------------------------------------------------------------
/.github/release-drafter-config.yml:
--------------------------------------------------------------------------------
1 | name-template: "$RESOLVED_VERSION"
2 | tag-template: "$RESOLVED_VERSION"
3 | categories:
4 | - title: "Breaking Changes"
5 | labels:
6 | - breaking
7 | - title: 🚀 Features
8 | labels:
9 | - feature
10 | - enhancement
11 | - title: 🐛 Bug Fixes
12 | labels:
13 | - bug
14 | - title: 🔐 Security updates
15 | labels:
16 | - security
17 | - title: ⚠️ Maintenance
18 | labels:
19 | - chore
20 | - maintenance
21 | - title: 📄 Documentation
22 | labels:
23 | - docs
24 | - documentation
25 | - title: 🧩 Dependency Updates
26 | labels:
27 | - deps
28 | - dependencies
29 | collapse-after: 5
30 | change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
31 | change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
32 | exclude-labels:
33 | - "skip-changelog"
34 | version-resolver:
35 | major:
36 | labels:
37 | - "breaking"
38 | minor:
39 | labels:
40 | - feature
41 | - enhancement
42 | patch:
43 | labels:
44 | - "bug"
45 | - "maintenance"
46 | - "chore"
47 | - "dependencies"
48 | - "deps"
49 | - "security"
50 | - "docs"
51 | template: |
52 | # What's Changed
53 |
54 | $CHANGES
55 |
56 | **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
57 |
--------------------------------------------------------------------------------
/devenv.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "devenv": {
4 | "locked": {
5 | "dir": "src/modules",
6 | "lastModified": 1739444039,
7 | "owner": "cachix",
8 | "repo": "devenv",
9 | "rev": "1235cd13f47df6ad19c8a183c6eabc1facb7c399",
10 | "type": "github"
11 | },
12 | "original": {
13 | "dir": "src/modules",
14 | "owner": "cachix",
15 | "repo": "devenv",
16 | "type": "github"
17 | }
18 | },
19 | "flake-compat": {
20 | "flake": false,
21 | "locked": {
22 | "lastModified": 1733328505,
23 | "owner": "edolstra",
24 | "repo": "flake-compat",
25 | "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
26 | "type": "github"
27 | },
28 | "original": {
29 | "owner": "edolstra",
30 | "repo": "flake-compat",
31 | "type": "github"
32 | }
33 | },
34 | "gitignore": {
35 | "inputs": {
36 | "nixpkgs": [
37 | "pre-commit-hooks",
38 | "nixpkgs"
39 | ]
40 | },
41 | "locked": {
42 | "lastModified": 1709087332,
43 | "owner": "hercules-ci",
44 | "repo": "gitignore.nix",
45 | "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
46 | "type": "github"
47 | },
48 | "original": {
49 | "owner": "hercules-ci",
50 | "repo": "gitignore.nix",
51 | "type": "github"
52 | }
53 | },
54 | "nixpkgs": {
55 | "locked": {
56 | "lastModified": 1733477122,
57 | "owner": "cachix",
58 | "repo": "devenv-nixpkgs",
59 | "rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
60 | "type": "github"
61 | },
62 | "original": {
63 | "owner": "cachix",
64 | "ref": "rolling",
65 | "repo": "devenv-nixpkgs",
66 | "type": "github"
67 | }
68 | },
69 | "pre-commit-hooks": {
70 | "inputs": {
71 | "flake-compat": "flake-compat",
72 | "gitignore": "gitignore",
73 | "nixpkgs": [
74 | "nixpkgs"
75 | ]
76 | },
77 | "locked": {
78 | "lastModified": 1737465171,
79 | "owner": "cachix",
80 | "repo": "pre-commit-hooks.nix",
81 | "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
82 | "type": "github"
83 | },
84 | "original": {
85 | "owner": "cachix",
86 | "repo": "pre-commit-hooks.nix",
87 | "type": "github"
88 | }
89 | },
90 | "root": {
91 | "inputs": {
92 | "devenv": "devenv",
93 | "nixpkgs": "nixpkgs",
94 | "pre-commit-hooks": "pre-commit-hooks"
95 | }
96 | }
97 | },
98 | "root": "root",
99 | "version": 7
100 | }
101 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Container Structure Tests Action
2 |
3 | > GitHub Action that leverages Google´s [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) to run unit tests on your Docker images.
4 |
5 | [](https://github.com/features/actions)
6 | [](LICENSE)
7 | [](http://commitizen.github.io/cz-cli/)
8 | [](https://github.com/brpaz/structure-tests-action/actions)
9 |
10 |
11 | ## Usage
12 |
13 | ### Basic usage
14 |
15 | ```yml
16 | steps:
17 | uses: brpaz/structure-tests-action@1.3.0
18 | with:
19 | image: myimage:latest
20 | configFile: structure-tests.yaml
21 | ```
22 |
23 | ### With Docker Actions
24 |
25 | ```yaml
26 | env:
27 | TEST_IMAGE_TAG: image:${{ github.sha }}
28 | jobs:
29 | test:
30 | name: Test
31 | runs-on: ubuntu-latest
32 | needs: [lint]
33 | steps:
34 | - name: Checkout
35 | uses: actions/checkout@v4
36 |
37 | - name: Set up QEMU
38 | uses: docker/setup-qemu-action@v3
39 |
40 | - name: Set up Docker Buildx
41 | uses: docker/setup-buildx-action@v3
42 |
43 | - name: Build test image
44 | uses: docker/build-push-action@v5
45 | with:
46 | context: .
47 | load: true
48 | tags: ${{ env.TEST_IMAGE_TAG }}
49 |
50 | - name: Test
51 | uses: brpaz/structure-tests-action@1.3.0
52 | with:
53 | image: ${{ env.TEST_IMAGE_TAG }}
54 | configFile: structure-tests.yaml
55 | ```
56 |
57 | ## Inputs
58 |
59 | **`image`**
60 |
61 | **Required** The image name to test
62 |
63 | **`configFile`**
64 |
65 | **Required** The path to the structure tests configuration file. Defaults to `structure-tests.yaml`
66 |
67 |
68 | ## 🤝 Contributing
69 |
70 | Check [CONTRIBUTING.md](CONTRIBUTING.md) for details.
71 |
72 | ## 🫶 Support
73 |
74 | If you find this project helpful and would like to support its development, there are a few ways you can contribute:
75 |
76 | [](https://github.com/sponsors/brpaz)
77 |
78 |
79 |
80 | ## Author
81 |
82 | 👤 **Bruno Paz**
83 |
84 | * Website: [https://github.com/brpaz](https://github.com/brpaz)
85 | * Github: [@brpaz](https://github.com/brpaz)
86 |
87 | ## 📝 License
88 |
89 | Copyright © 2019 [Bruno Paz](https://github.com/brpaz).
90 |
91 | This project is [MIT](LICENSE) licensed.
92 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing guidelines
2 |
3 | Welcome to our project's contribution guidelines! We're thrilled that you're interested in contributing to our repository.
4 |
5 | This document outlines the process for making contributions to our project, whether you're fixing a bug, implementing a new feature, or suggesting improvements. Please take a moment to review these guidelines before diving into your contributions. Your participation is invaluable, and we appreciate your efforts to make our project better for everyone.
6 |
7 | Let's build something great together!
8 |
9 | - [Contributing guidelines](#contributing-guidelines)
10 | - [Reporting issues](#reporting-issues)
11 | - [Contribute with code](#contribute-with-code)
12 | - [Setup development envrionment](#setup-development-envrionment)
13 | - [Using Devbox](#using-devbox)
14 | - [Using dev containers](#using-dev-containers)
15 | - [Tools we use](#tools-we-use)
16 | - [Development lifecycle](#development-lifecycle)
17 | - [Submitting your changes for review](#submitting-your-changes-for-review)
18 | - [Commit guidelines](#commit-guidelines)
19 | - [Release process](#release-process)
20 |
21 |
22 | ## Reporting issues
23 |
24 | If you found any issue, feel free to submit a [GitHub issue](https://github.com/brpaz/structure-tests-action)
25 |
26 | Before submitting a new issue, we encourage you to utilize the search functionality to check if a similar issue has already been reported. This ensures that we avoid duplication and allows us to focus on addressing unique problems effectively.
27 |
28 | When creating a new issue, please provide the most information you can like application version, operating system, logs and stack traces and anything else that you think is relevant and can help the investigation process.
29 |
30 | ## Contribute with code
31 |
32 | If you are a developer, and want to contribute with the code, please follow the next steps, to understand how to setup the development envrionment and our release process.
33 |
34 | ### Setup development envrionment
35 |
36 | #### Using Devbox
37 |
38 | The easiest way to setup this project on your local machine is to use [devbox](https://github.com/jetify-com/devbox).
39 |
40 | Devbox is a command-line tool that lets you easily create isolated shells for development. You start by defining the list of packages required for your project, and Devbox creates an isolated, reproducible environment with those packages installed, using the powerfull [Nix](https://nixos.org/) under the hood.
41 |
42 | You can install it using the following command:
43 | ```sh
44 | curl -fsSL https://get.jetpack.io/devbox | bash
45 | ```
46 |
47 | Then run `devbox shell` to start a shell, with all the tools installed by devbox.
48 |
49 | > [!TIP]
50 | > To learn more about Devbox, check the [Introduction guide](https://www.jetify.com/devbox/docs/) on Devbox website.
51 |
52 |
53 | #### Using dev containers
54 |
55 | If you use VSCode or GitHub Codespaces, we also provide a [Devcontainer](https://containers.dev/) definition that you can use. It´s simply a wrapper for Devbox, but allows to start coding right way, without even installing Devbox on your machine.
56 |
57 | ### Tools we use
58 |
59 | - [Task](https://taskfile.dev/) a task runner / build tool, modern alternative to Make. Useful to define common tasks like build the application or run the tests. Run `task -l` or check [Taskfile.yml](Taskfile.yml) to see the available tasks.
60 | - [lefthook](https://github.com/evilmartians/lefthook) - Fast and powerful Git hooks manager for any type of projects. Useful to run tasks like linting and formatting, before commiting changes GitHub.
61 | - [commitlint](https://commitlint.js.org/) - Lint commit messages ensuring a standard structure acorss all commits.
62 |
63 | ### Development lifecycle
64 |
65 | This project follows [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) for managing changes.
66 |
67 | When implmenting a new feature, start by creating a new branch from `main`, with a descriptive name (Ex: `feat/my-awesome-feature` or `fix/some-bug`).
68 |
69 | Having a descriptive name helps to reason about the branches, when you have many.
70 |
71 | Checkout to that branch and do your changes.
72 |
73 | Some useful guidelines when working on feature branches:
74 |
75 | - **keep it short lived** - Long running feature branches can lead to problems, like merge conflicts. You should aim to create a feature branch, for a feature than is small enough to be done in a few days.
76 | - **rebase with main at least once a day** - this ensure you are always working with the most recent code and allows to fix any conflicts that might occurr, early in the process.
77 |
78 | #### Submitting your changes for review
79 |
80 | When you are ready create a Pull request to the main branch.
81 |
82 | When creating a pull request, you should:
83 |
84 | - Provide a descriptive PR title, following [Conventional Commits](https://www.conventionalcommits.org/en/) specification.
85 | - Provide a short description of what changes you did, core architecture decisions you took, and link to any issue the PR might relate to.
86 | - Ensure that any automated checks like Linting and Tests pass.
87 |
88 | The PR will then be reviewed and changes may by requested. Keep commiting those changes, until the PR is approved.
89 |
90 | After being approved, the maintainers will merge the PR to main branch and start the release process.
91 |
92 | #### Commit guidelines
93 |
94 | The project folows [Conventional Commits](https://www.conventionalcommits.org/en/) specification.
95 |
96 | Each commit message should begin with a type, indicating the nature of the change (e.g., feat for a new feature, fix for a bug fix, docs for documentation changes), followed by a concise and descriptive message.
97 |
98 | Additionally, providing an optional scope and further details in the commit message body is encouraged when necessary. This approach streamlines the review process, facilitates automated release notes generation, and enhances overall project maintainability.
99 |
100 | We also recommend squashing your commits when appropriate.
101 |
102 | ## Release process
103 |
104 | We use [Release Drafter](https://github.com/marketplace/actions/release-drafter) to automatically create draft releases with appropriate release notes, anytime a PR is merged.
105 |
106 | When we are ready to create a new release, we simply publish the release, which will trigger GitHub actions, that will publish any related artifacts and commit a Changelog to the project repository.
107 |
108 |
109 |
--------------------------------------------------------------------------------
/tags:
--------------------------------------------------------------------------------
1 | !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/
2 | !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/
3 | !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/
4 | !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/
5 | !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/
6 | !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/
7 | !_TAG_FIELD_DESCRIPTION input /input file/
8 | !_TAG_FIELD_DESCRIPTION name /tag name/
9 | !_TAG_FIELD_DESCRIPTION pattern /pattern/
10 | !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/
11 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
12 | !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
13 | !_TAG_KIND_DESCRIPTION!HTML C,stylesheet /stylesheets/
14 | !_TAG_KIND_DESCRIPTION!HTML I,id /identifiers/
15 | !_TAG_KIND_DESCRIPTION!HTML J,script /scripts/
16 | !_TAG_KIND_DESCRIPTION!HTML a,anchor /named anchors/
17 | !_TAG_KIND_DESCRIPTION!HTML c,class /classes/
18 | !_TAG_KIND_DESCRIPTION!HTML h,heading1 /H1 headings/
19 | !_TAG_KIND_DESCRIPTION!HTML i,heading2 /H2 headings/
20 | !_TAG_KIND_DESCRIPTION!HTML j,heading3 /H3 headings/
21 | !_TAG_KIND_DESCRIPTION!HTML t,title /titles/
22 | !_TAG_KIND_DESCRIPTION!Iniconf k,key /keys/
23 | !_TAG_KIND_DESCRIPTION!Iniconf s,section /sections/
24 | !_TAG_KIND_DESCRIPTION!JSON a,array /arrays/
25 | !_TAG_KIND_DESCRIPTION!JSON b,boolean /booleans/
26 | !_TAG_KIND_DESCRIPTION!JSON n,number /numbers/
27 | !_TAG_KIND_DESCRIPTION!JSON o,object /objects/
28 | !_TAG_KIND_DESCRIPTION!JSON s,string /strings/
29 | !_TAG_KIND_DESCRIPTION!JSON z,null /nulls/
30 | !_TAG_KIND_DESCRIPTION!M4 I,macrofile /macro files/
31 | !_TAG_KIND_DESCRIPTION!M4 d,macro /macros/
32 | !_TAG_KIND_DESCRIPTION!Markdown S,subsection /level 2 sections/
33 | !_TAG_KIND_DESCRIPTION!Markdown T,l4subsection /level 4 sections/
34 | !_TAG_KIND_DESCRIPTION!Markdown c,chapter /chapters/
35 | !_TAG_KIND_DESCRIPTION!Markdown n,footnote /footnotes/
36 | !_TAG_KIND_DESCRIPTION!Markdown s,section /sections/
37 | !_TAG_KIND_DESCRIPTION!Markdown t,subsubsection /level 3 sections/
38 | !_TAG_KIND_DESCRIPTION!Markdown u,l5subsection /level 5 sections/
39 | !_TAG_KIND_DESCRIPTION!Sh a,alias /aliases/
40 | !_TAG_KIND_DESCRIPTION!Sh f,function /functions/
41 | !_TAG_KIND_DESCRIPTION!Sh h,heredoc /label for here document/
42 | !_TAG_KIND_DESCRIPTION!Sh s,script /script files/
43 | !_TAG_KIND_DESCRIPTION!SystemdUnit u,unit /units/
44 | !_TAG_KIND_DESCRIPTION!WindRes a,accelerators /accelerators/
45 | !_TAG_KIND_DESCRIPTION!WindRes b,bitmap /bitmaps/
46 | !_TAG_KIND_DESCRIPTION!WindRes c,cursor /cursors/
47 | !_TAG_KIND_DESCRIPTION!WindRes d,dialog /dialogs/
48 | !_TAG_KIND_DESCRIPTION!WindRes f,font /fonts/
49 | !_TAG_KIND_DESCRIPTION!WindRes i,icon /icons/
50 | !_TAG_KIND_DESCRIPTION!WindRes m,menu /menus/
51 | !_TAG_KIND_DESCRIPTION!WindRes v,version /versions/
52 | !_TAG_KIND_DESCRIPTION!Yaml a,anchor /anchors/
53 | !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/
54 | !_TAG_OUTPUT_FILESEP slash /slash or backslash/
55 | !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
56 | !_TAG_OUTPUT_VERSION 0.0 /current.age/
57 | !_TAG_PARSER_VERSION!HTML 0.0 /current.age/
58 | !_TAG_PARSER_VERSION!Iniconf 0.0 /current.age/
59 | !_TAG_PARSER_VERSION!JSON 0.0 /current.age/
60 | !_TAG_PARSER_VERSION!M4 0.0 /current.age/
61 | !_TAG_PARSER_VERSION!Markdown 0.0 /current.age/
62 | !_TAG_PARSER_VERSION!Sh 0.0 /current.age/
63 | !_TAG_PARSER_VERSION!SystemdUnit 0.0 /current.age/
64 | !_TAG_PARSER_VERSION!WindRes 0.0 /current.age/
65 | !_TAG_PARSER_VERSION!Yaml 0.0 /current.age/
66 | !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
67 | !_TAG_PROC_CWD /home/bruno/Code/Personal/github-actions/structure-tests-action/ //
68 | !_TAG_PROGRAM_AUTHOR Universal Ctags Team //
69 | !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
70 | !_TAG_PROGRAM_URL https://ctags.io/ /official site/
71 | !_TAG_PROGRAM_VERSION 6.0.0 //
72 | !_TAG_ROLE_DESCRIPTION!HTML!class attribute /assigned as attributes/
73 | !_TAG_ROLE_DESCRIPTION!HTML!script extFile /referenced as external files/
74 | !_TAG_ROLE_DESCRIPTION!HTML!stylesheet extFile /referenced as external files/
75 | !_TAG_ROLE_DESCRIPTION!M4!macro undef /undefined/
76 | !_TAG_ROLE_DESCRIPTION!M4!macrofile included /included macro/
77 | !_TAG_ROLE_DESCRIPTION!M4!macrofile sincluded /silently included macro/
78 | !_TAG_ROLE_DESCRIPTION!Sh!heredoc endmarker /end marker/
79 | !_TAG_ROLE_DESCRIPTION!Sh!script loaded /loaded/
80 | !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit After /referred in After key/
81 | !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Before /referred in Before key/
82 | !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit RequiredBy /referred in RequiredBy key/
83 | !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Requires /referred in Requires key/
84 | !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit WantedBy /referred in WantedBy key/
85 | !_TAG_ROLE_DESCRIPTION!SystemdUnit!unit Wants /referred in Wants key/
86 | !_TAG_ROLE_DESCRIPTION!Yaml!anchor alias /alias/
87 | $schema renovate.json /^ "$schema": "https:\/\/docs.renovatebot.com\/renovate-schema.json",$/;" s
88 | 0 .devcontainer/devcontainer.json /^ "mkhl.direnv"$/;" s array:customizations.vscode.extensions
89 | 0 .vscode/extensions.json /^ "recommendations": ["task.vscode-task", "mkhl.direnv"]$/;" s array:recommendations
90 | 0 renovate.json /^ "brpaz"$/;" s array:reviewers
91 | 0 renovate.json /^ "config:recommended"$/;" s array:extends
92 | 0 renovate.json /^ "dependencies"$/;" s array:labels
93 | 1 .vscode/extensions.json /^ "recommendations": ["task.vscode-task", "mkhl.direnv"]$/;" s array:recommendations
94 | After .devenv/profile/etc/systemd/system/docker.service /^After=network-online.target docker.socket firewalld.service containerd.service time-set.target$/;" k section:Unit
95 | Author README.md /^## Author$/;" s chapter:Container Structure Tests Action
96 | Basic usage README.md /^### Basic usage$/;" S section:Container Structure Tests Action""Usage
97 | Changelog CHANGELOG.md /^# Changelog$/;" c
98 | Commit guidelines CONTRIBUTING.md /^#### Commit guidelines$/;" t subsection:Contributing guidelines""Contribute with code""Development lifecycle
99 | Common beginner's mistakes .devenv/profile/share/shellcheck/README.md /^### Common beginner's mistakes$/;" S section:ShellCheck - A shell script static analysis tool""Gallery of bad code
100 | Compiling ShellCheck .devenv/profile/share/shellcheck/README.md /^### Compiling ShellCheck$/;" S section:ShellCheck - A shell script static analysis tool""Compiling from source
101 | Compiling from source .devenv/profile/share/shellcheck/README.md /^## Compiling from source$/;" s chapter:ShellCheck - A shell script static analysis tool
102 | Concepts .devenv/profile/share/doc/pkg-config/pkg-config-guide.html /^