Skip to content

Commit

Permalink
Update super-linter.yml (#19)
Browse files Browse the repository at this point in the history
* Update super-linter.yml

* Update gradle-build.yml

* Update gradle-build.yml

* Update super-linter.yml

* clean up files?

* update perms for actions
  • Loading branch information
jack60612 authored Jan 17, 2025
1 parent c75e66a commit 1616f90
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
58 changes: 30 additions & 28 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ name: Build & Format Check
# events but only for the main branch.
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions: read-all

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -22,22 +24,22 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: gradle/gradle-build-action@v2 # enables fancy caching.
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1 # this validates the jar file
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: gradle/actions/setup-gradle@v3 # enables fancy caching.
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3 # this validates the jar file

# Declares the repository safe and not under dubious ownership.
- name: Add repository to git safe directories
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Declares the repository safe and not under dubious ownership.
- name: Add repository to git safe directories
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

# Make gradlew executable
- name: Make grandlew executable
run: chmod +x gradlew
# Make gradlew executable
- name: Make grandlew executable
run: chmod +x gradlew

# build.
- name: Compile and run tests on robot code
run: ./gradlew build
# build.
- name: Compile and run tests on robot code
run: ./gradlew build

Formatting:
# The type of runner that the job will run on
Expand All @@ -48,19 +50,19 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: gradle/gradle-build-action@v2 # enables fancy caching.
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1 # this validates the jar file
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: gradle/actions/setup-gradle@v3 # enables fancy caching.
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3 # this validates the jar file

# Declares the repository safe and not under dubious ownership.
- name: Add repository to git safe directories
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Declares the repository safe and not under dubious ownership.
- name: Add repository to git safe directories
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

# Make gradlew executable
- name: Make grandlew executable
run: chmod +x gradlew
# Make gradlew executable
- name: Make grandlew executable
run: chmod +x gradlew

# check formatting.
- name: Validate Code is properly formatted
run: ./gradlew spotlessCheck
# check formatting.
- name: Validate Code is properly formatted
run: ./gradlew spotlessCheck
8 changes: 4 additions & 4 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


---
#################################
#################################
Expand All @@ -23,6 +21,8 @@ on:
pull_request:
branches: [master, main]

permissions: read-all

###############
# Set the Job #
###############
Expand All @@ -41,7 +41,7 @@ jobs:
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
Expand All @@ -51,7 +51,7 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter/slim@v4
uses: github/super-linter/slim@v7
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_JSCPD: false
Expand Down

0 comments on commit 1616f90

Please sign in to comment.