Skip to content

Add CadZinho

Add CadZinho #137

name: Validate PR for githubbrasil.com website
on:
pull_request:
branches:
- main
paths:
- "website/**"
jobs:
lint:
runs-on: ubuntu-latest
permissions: read-all
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Check format of yaml file
id: yaml-lint
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c #v3.1.1
with:
strict: true
file_or_dir: website/**/*.yml
config_data: |
rules:
empty-lines:
max: 1
hyphens:
max-spaces-after: 1
indentation:
spaces: consistent
indent-sequences: true
check-multi-line-strings: false
new-lines:
type: unix
colons:
max-spaces-before: 0
max-spaces-after: 1
empty-values:
forbid-in-block-mappings: true
key-duplicates: false
format: github
validate:
runs-on: ubuntu-latest
needs: lint
permissions:
contents: read
pull-requests: write
actions: write
steps:
- name: Checkout fork
uses: actions/checkout@v3
- name: Checkout main
uses: actions/checkout@v3
with:
ref: main
repository: ${{ secrets.BRAZIL_REPO_NWO }}
path: ./brazil-main
- uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 #v1.207.0
with:
ruby-version: 3.0.0
- name: Validate PR
run: |
gem install octokit safe_yaml
ruby brazil-main/script/website-pr-validation.rb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRAZIL_REPO_NWO: ${{ secrets.BRAZIL_REPO_NWO }}