Code Monkey home page Code Monkey logo

actions-detect-directory-changes's Introduction

Hi! I'm Theo

I help people build better software

Theo's GitHub stats

actions-detect-directory-changes's People

Contributors

ebachle avatar endersonmaia avatar tchupp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

actions-detect-directory-changes's Issues

spelling

thanks for making this! it's very useful.

just wanted to note "extentions" should be spelled "extensions" (e.g., in included-extentions).

Unable to detect changes

@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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.