Skip to content

Commit

Permalink
Update workflows and super-linter (#674)
Browse files Browse the repository at this point in the history
* Bump actions/checkout to v4
* Bump super-linter to v5 slim
* Fix default branch name
* Only run on push to master or release branches
Also re-disables linting entire codebase
* Satisfy linter
* Run the linter in more cases for PRs
  • Loading branch information
mvdkleijn authored Jan 25, 2024
1 parent 742d6d7 commit ca225cc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
#################################
name: Lint Code Base

#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on:
on: # yamllint disable-line rule:truthy
push:
# Remove the line above to run when pushing to master
branches:
- 'master'
- 'releases/**'
pull_request:
types: [opened, edited, synchronize, reopened, review_requested]

###############
# Set the Job #
Expand All @@ -29,6 +27,12 @@ jobs:
# Set the agent to run on
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

##################
# Load all steps #
##################
Expand All @@ -37,18 +41,18 @@ jobs:
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
# Full git history is needed to get a proper list of changed files
# within `super-linter`
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4
uses: super-linter/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: false
# Change to 'master' if your main branch differs
DEFAULT_BRANCH: main
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Deploy to GitHub Pages

on:
Expand All @@ -15,7 +16,7 @@ jobs:

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

- name: Setup node env
uses: actions/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/prchecks.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: PR Checks

on:
Expand All @@ -16,7 +17,7 @@ jobs:

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

- name: Setup node env
uses: actions/[email protected]
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/svgo.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# GitHub Action uses SVGO to Minify and removeDimensions of SVG files
name: Optimize SVG Files

Expand All @@ -14,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Optimize SVGs
uses: ericcornelissen/svgo-action@v3
id: svgo
Expand All @@ -25,4 +26,4 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
if: ${{steps.svgo.outputs.DID_OPTIMIZE}}
with:
commit_message: Optimize ${{steps.svgo.outputs.OPTIMIZED_COUNT}} SVG(s)
commit_message: Optimize ${{steps.svgo.outputs.OPTIMIZED_COUNT}} SVG(s) # yamllint disable-line rule:line-length

0 comments on commit ca225cc

Please sign in to comment.