Skip to content

build(deps): bump tj-actions/changed-files from 45.0.3 to 45.0.4 #1325

build(deps): bump tj-actions/changed-files from 45.0.3 to 45.0.4

build(deps): bump tj-actions/changed-files from 45.0.3 to 45.0.4 #1325

Workflow file for this run

name: Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
jobs:
prepare:
name: Create build context
runs-on: ubuntu-22.04
outputs:
matrix-genesis: ${{ steps.matrix-genesis.outputs.config }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Find changed genesis files
id: changed-genesis
uses: tj-actions/[email protected]
with:
safe_output: false
separator: ","
files: |
chains/*/genesis.json
- name: Setup matrix (for changed genesis)
id: matrix-genesis
run: |
CONFIG=""
ALL_MODIFIED_FILES="${{ steps.changed-genesis.outputs.all_modified_files }}"
IFS=',' read -r -a GENESISFILES <<< "$ALL_MODIFIED_FILES"
for GENESISFILE in "${GENESISFILES[@]}"; do
APATH=$(dirname ${GENESISFILE})
NETWORK=$(basename ${APATH})
NAME=$(basename ${GENESISFILE})
CONFIG="${CONFIG:+${CONFIG}, }{\"path\": \"${APATH}\", \"network\": \"${NETWORK}\", \"name\": \"${NAME}\"}"
done
echo "config=[${CONFIG}]" >> $GITHUB_OUTPUT
lint-commits:
runs-on: ubuntu-22.04
if: github.actor != 'dependabot[bot]'
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check commits
uses: wagoid/commitlint-github-action@v6
lint-markdown:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Lint markdown files
uses: avto-dev/[email protected]
with:
args: "**/*.md"
lint-yaml:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Lint yaml files
uses: ibiqlik/[email protected]
lint-json:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Lint json files
run: |
sudo apt install -y jsonlint
find ./ -type f -name "*.json" -exec sh -c '
for file do
if ! jsonlint-php -q "$file"; then
echo "❌ $file"
export FAILED=1
else
echo "✅ $file"
fi
done
if [ "${FAILED}" = "1" ]; then
exit 1
fi
' sh {} +
lint-genesis:
if: needs.prepare.outputs.matrix-genesis != '[]'
runs-on: ubuntu-22.04
needs: prepare
strategy:
matrix:
context: ${{ fromJson(needs.prepare.outputs.matrix-genesis) }}
fail-fast: false
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Check genesis files
run: |
echo "🔎 Checking 'axone-${{ matrix.context.network }}' genesis"
docker run --rm -v ${GITHUB_WORKSPACE}/${{ matrix.context.path }}/${{ matrix.context.name }}:/genesis.json axoneprotocol/axoned:`cat ./chains/${{ matrix.context.network }}/version.txt` genesis validate /genesis.json