mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
|
|
|
name: 'Test - YAML check'
|
|
on: [workflow_dispatch]
|
|
env:
|
|
CMAKE_REQUIRED_QUIET: "OFF"
|
|
CTEST_OUTPUT_ON_FAILURE: "ON"
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
jobs:
|
|
job-yaml-check:
|
|
if: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- container: 'alpine:3.16'
|
|
- container: 'alpine:3.17'
|
|
- container: 'alpine:3.18'
|
|
- container: 'alpine:edge'
|
|
name: ${{ format('{0}', matrix.container) }}
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.container }}
|
|
steps:
|
|
- name: ${{ format('Install packages {0}', matrix.container) }}
|
|
run: |
|
|
apk update && apk upgrade && apk add bash git yq
|
|
case ${{ matrix.container }} in
|
|
*:edge) apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing ytt ;;
|
|
esac
|
|
# this seems to be needed when running in a container (beause of UID mismatch??)
|
|
git config --global --add safe.directory '*'
|
|
- name: 'Check out code'
|
|
uses: actions/checkout@v4
|
|
with: { submodules: false }
|
|
- name: ${{ format('YAML check {0}', matrix.container) }}
|
|
shell: bash
|
|
run: |
|
|
for f in $(find . -type f -iname '*.yml' | LC_ALL=C sort); do
|
|
echo "===== checking file"
|
|
echo " yq $f"
|
|
yq < "$f" > /dev/null
|
|
if command -v ytt > /dev/null; then
|
|
echo " ytt $f"
|
|
ytt -f- < "$f" > /dev/null
|
|
fi
|
|
done
|
|
echo "All done."
|