generic ci coverage #138
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Reusable YAML Checks | ||
on: | ||
workflow_call: | ||
inputs: | ||
timeout_minutes: | ||
description: "Timeout in minutes for the job" | ||
type: number | ||
default: 10 | ||
inputs: | ||
runner: | ||
description: "The runner to use for the workflow" | ||
type: "string" | ||
default: "zondax-runners" | ||
required: false | ||
container_image: | ||
description: "The container image to use" | ||
type: "string" | ||
default: "oven/bun:1-alpine" | ||
required: false | ||
make_command: | ||
description: "The make command to run for yaml checks" | ||
type: "string" | ||
default: "yaml-checks" | ||
required: false | ||
github_app_auth: | ||
description: "Use GitHub App Token" | ||
required: false | ||
type: boolean | ||
default: false | ||
github_app_repos: | ||
description: "Additional repositories to access (one per line)" | ||
required: false | ||
type: string | ||
default: "" | ||
secrets: | ||
app_id: | ||
description: "GitHub App ID" | ||
required: false | ||
app_pem: | ||
description: "GitHub App PEM" | ||
required: false | ||
jobs: | ||
yaml-checks: | ||
runs-on: ${{ inputs.runner }} | ||
container: | ||
image: ${{ inputs.container_image }} | ||
timeout-minutes: ${{ inputs.timeout_minutes }} | ||
steps: | ||
- name: Install git and bash | ||
run: apk add --no-cache git bash | ||
- name: Checkout with GitHub App | ||
uses: zondax/actions/checkout-with-app@v1 | ||
with: | ||
github_app_auth: ${{ inputs.github_app_auth }} | ||
github_app_repos: ${{ inputs.github_app_repos }} | ||
app_id: ${{ secrets.app_id }} | ||
app_pem: ${{ secrets.app_pem }} | ||
- name: Install make | ||
run: | | ||
apk add --no-cache make | ||
- name: Check yaml | ||
run: | | ||
echo "Running prettier on YAML files..." | ||
bunx prettier --write "**/*.{yaml,yml}" |