Skip to content

Commit

Permalink
style(yamllint): fix yaml linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospereira committed Feb 14, 2024
1 parent f35fef4 commit 5d0d3f0
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 49 deletions.
1 change: 1 addition & 0 deletions .github/gradle-action/action.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Gradle Build Action'
description: 'Reusable GitHub Action for performing a gradle build or running a gradle task.'

Expand Down
1 change: 1 addition & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
queue_rules:
Expand Down
3 changes: 2 additions & 1 deletion .github/sync.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
group:
# Using Bootstrap 5
- files:
- # dotfiles to sync
# dotfiles to sync
- .dockerignore
- .editorconfig
- .envrc
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
name: CI

# yamllint disable rule:truthy
on:
push:
branches: [ "main" ]
pull_request:
types: [ "opened", "synchronize", "reopened" ]
# yamllint enable rule:truthy

env:
GRADLE_OPTS: '-Dorg.gradle.console=plain -Dorg.gradle.caching=true -Dsonar.gradle.skipCompile=true -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
GRADLE_OPTS: >
-Dorg.gradle.console=plain
-Dorg.gradle.caching=true
-Dsonar.gradle.skipCompile=true
-Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
concurrency:
# This workflow cuts releases, so we want only a
Expand Down Expand Up @@ -56,7 +63,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*" # latest lts
node-version: "lts/*" # latest lts
check-latest: true
cache: "npm"
- name: npm install
Expand All @@ -71,7 +78,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*" # latest lts
node-version: "lts/*" # latest lts
check-latest: true
cache: "npm"
- name: npm install
Expand Down Expand Up @@ -226,7 +233,7 @@ jobs:
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
contents: write
packages: read # to preserve default permissions
packages: read # to preserve default permissions
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ needs.generate-tag-name.outputs.tagName }}
Expand Down Expand Up @@ -254,13 +261,16 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # 0 indicates all history for all branches and tags.
fetch-depth: 0 # 0 indicates all history for all branches and tags.
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Docker / Get image name
id: dockerImageName
# yamllint disable rule:line-length
# language="shell script"
run: |
echo "dockerImageName=${{ env.REGISTRY }}/${{ github.repository }}" | tr '[:upper:]' '[:lower:]'>> "$GITHUB_OUTPUT"
# yamllint enable rule:line-length
- name: Create Image
run: docker image build -t ${{ steps.dockerImageName.outputs.dockerImageName }}:latest .
# Needs to log in to use docker scout below
Expand Down
65 changes: 31 additions & 34 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
name: "CodeQL"

# yamllint disable rule:truthy
on:
push:
branches: [ "main" ]
pull_request:
types: [ "opened", "synchronize", "reopened" ]
schedule:
- cron: "32 11 * * 5"
# yamllint enable rule:truthy

env:
GRADLE_OPTS: '-Dorg.gradle.console=plain -Dorg.gradle.caching=true -Dsonar.gradle.skipCompile=true -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
GRADLE_OPTS: >
-Dorg.gradle.console=plain
-Dorg.gradle.caching=true
-Dsonar.gradle.skipCompile=true
-Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
jobs:
analyze:
Expand All @@ -38,42 +45,32 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Setup project required versions of Gradle and Java
- name: Set up Gradle and Java
uses: ./.github/gradle-action
# Setup project required versions of Gradle and Java
- name: Set up Gradle and Java
uses: ./.github/gradle-action

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
5 changes: 4 additions & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
name: 'Dependency Review'

# yamllint disable rule:truthy
on: [pull_request]
# yamllint enable rule:truthy

permissions:
contents: read
Expand All @@ -16,4 +19,4 @@ jobs:
uses: actions/dependency-review-action@v4
with:
fail-on-severity: high
fail-on-scopes: runtime
fail-on-scopes: runtime
11 changes: 9 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
name: Lighthouse CI

# yamllint disable rule:truthy
on:
push:
branches: [ "main" ]
pull_request:
types: [ "opened", "synchronize", "reopened" ]
# yamllint enable rule:truthy

env:
GRADLE_OPTS: '-Dorg.gradle.console=plain -Dorg.gradle.caching=true -Dsonar.gradle.skipCompile=true -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
GRADLE_OPTS: >
-Dorg.gradle.console=plain
-Dorg.gradle.caching=true
-Dsonar.gradle.skipCompile=true
-Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
jobs:
lighthouse-ci:
Expand All @@ -28,4 +35,4 @@ jobs:
PROJECT_TOKEN: ${{ vars.LHCI_PROJECT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.LHCI_GITHUB_TOKEN }}
BASIC_AUTH_USERNAME: ${{ secrets.LHCI_BASIC_AUTH_USERNAME }}
BASIC_AUTH_PASSWORD: ${{ secrets.LHCI_BASIC_AUTH_PASSWORD }}
BASIC_AUTH_PASSWORD: ${{ secrets.LHCI_BASIC_AUTH_PASSWORD }}
11 changes: 9 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
name: Main

# yamllint disable rule:truthy
on:
push:
branches: [ "main" ]
release:
types: [ "created", "published" ]
# yamllint enable rule:truthy

env:
GRADLE_OPTS: '-Dorg.gradle.console=plain -Dorg.gradle.caching=true -Dsonar.gradle.skipCompile=true -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
GRADLE_OPTS: >
-Dorg.gradle.console=plain
-Dorg.gradle.caching=true
-Dsonar.gradle.skipCompile=true
-Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=512m"'
permissions:
contents: write
Expand All @@ -26,4 +33,4 @@ jobs:
java-version: "21"
distribution: "temurin"
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v3
9 changes: 7 additions & 2 deletions .github/workflows/repo-files-sync.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
name: Sync Files

# yamllint disable rule:truthy
on:
workflow_run:
types: [ completed ]
workflows: [ CI ]
branches: [ main ]
# yamllint enable rule:truthy

jobs:
summary:
Expand All @@ -17,6 +20,7 @@ jobs:
variables: >-
COMMIT_SHA="${{ github.event.workflow_run.head_sha }}"
SHORT_SHA="${COMMIT_SHA:0:7}"
# yamllint disable rule:line-length
# language="markdown"
template: |
## Workflow Run Summary
Expand All @@ -29,6 +33,7 @@ jobs:
| Workflow Run Created At | ${{ github.event.workflow_run.created_at }} |
| Workflow Run Updated At | ${{ github.event.workflow_run.updated_at }} |
| Workflow Run Head SHA | [`$SHORT_SHA`]($COMMIT_SHA) |
# yamllint enable rule:line-length

sync:
runs-on: ubuntu-latest
Expand All @@ -37,7 +42,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run GitHub File Sync
uses: BetaHuhn/repo-file-sync-action@v1.21.0
uses: Liber-UFPE/repo-file-sync-action@v1.22.1
with:
GH_PAT: ${{ secrets.REPO_SYNC_PAT }}
COMMIT_EACH_FILE: false # Commit all files at once
COMMIT_EACH_FILE: false # Commit all files at once
3 changes: 3 additions & 0 deletions .github/workflows/validate-links.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
name: "Validate External Links"

# yamllint disable rule:truthy
on:
push:
branches: [ "main" ]
pull_request:
types: [ "opened", "synchronize", "reopened" ]
# yamllint enable rule:truthy

jobs:
validate-external-links:
Expand Down
3 changes: 2 additions & 1 deletion detekt-config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
# This is supposed to be used together with `--build-upon-default-config` CLI option.
# Meaning that all the defaults would be respected, except that we don't want to exclude
# `DetektProgressListener`. Therefore, `exclude` is set to an empty array.
processors:
active: true
exclude: []
exclude: []
1 change: 1 addition & 0 deletions diktat-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
- name: DIKTAT_COMMON
Expand Down
23 changes: 22 additions & 1 deletion micronaut-cli.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
---
# DO NOT EDIT: this file is automatically synced from the template repository
# in https://github.com/Liber-UFPE/project-starter.
applicationType: default
defaultPackage: br.ufpe.liber
testFramework: kotest
sourceLanguage: kotlin
buildTool: gradle_kotlin
features: [app-name, config4k, graalvm, gradle, http-client-test, kotest, kotlin, kotlin-application, kotlin-extension-functions, ksp, logback, micronaut-aot, micronaut-build, micronaut-http-validation, netty-server, properties, readme, serialization-jackson, shade, views-jte]
features:
- app-name
- config4k
- graalvm
- gradle
- http-client-test
- kotest
- kotlin
- kotlin-application
- kotlin-extension-functions
- ksp
- logback
- micronaut-aot
- micronaut-build
- micronaut-http-validation
- netty-server
- properties
- readme
- serialization-jackson
- shade
- views-jte

0 comments on commit 5d0d3f0

Please sign in to comment.