tchupp / actions-detect-directory-changes Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
thanks for making this! it's very useful.
just wanted to note "extentions" should be spelled "extensions" (e.g., in included-extentions
).
@tchupp I'm trying to use your gh action but it seems to be unable to detect any changes even though folders have change. This is my CI file:
name: Gosec Security Scan
on:
push:
branches:
- "master"
- "main"
pull_request:
branches:
- "*"
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.detect.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect Directory Changes
id: detect
uses: tchupp/actions-detect-directory-changes@v1
with:
included-paths: "!./.github/**"
gosec-scan:
runs-on: ubuntu-latest
needs: detect-changes
env:
GO111MODULE: on
strategy:
matrix:
modules: ${{ fromJSON(needs.detect-changes.outputs.changed) }}
steps:
- name: Fetch Repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '^1.19.x'
check-latest: true
cache: false
- name: Install gosec
run: go install github.com/securego/gosec/v2/cmd/gosec@latest
- name: Run gosec
working-directory: ${{ matrix.modules }}
run: gosec ./...
When running the following output shows only changes in .github/
, I also have changes in the redis
directory
env:
INCLUDED_PATHS: !./.github/**
IF_THESE_PATHS_CHANGE_RETURN_ALL_INCLUDED_PATHS:
CHANGED_DIRECTORIES: ./.github/workflows
ALL_DIRECTORIES: . .github .github/ISSUE_TEMPLATE .github/scripts .github/workflows arangodb azureblob badger bbolt coherence couchbase dynamodb etcd memcache memory memory/internal minio mongodb mssql mysql pebble postgres redis ristretto rueidis s3 scylladb sqlite3
This warning also shows for the whole action .yml file:
Error when evaluating 'strategy' for job 'gosec-scan'. .github/workflows/gosec.yml (Line: 45, Col: 18): Matrix vector 'modules' does not contain any values
Make sure the list is unique before returning it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.