diff --git a/.github/workflows/scan-licenses.yml b/.github/workflows/scan-licenses.yml new file mode 100644 index 0000000..d12d4da --- /dev/null +++ b/.github/workflows/scan-licenses.yml @@ -0,0 +1,26 @@ +name: Scan licenses + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + workflow_call: + +jobs: + scanning: + runs-on: ubuntu-latest + name: License scanning + steps: + - name: Git checkout + uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - name: Run license scanning + run: | + bundle config --local deployment false + bundle lock --add-platform x86_64-linux + bundle config --local deployment true + bundle exec license_finder diff --git a/scan-licenses.yml b/scan-licenses.yml new file mode 100644 index 0000000..bb994a0 --- /dev/null +++ b/scan-licenses.yml @@ -0,0 +1,12 @@ +name: Scan licenses + +on: + workflow_dispatch: + push: + paths: + - 'Gemfile*' + - 'package.json' + +jobs: + scanning: + uses: infinum/default_rails_template/.github/workflows/scan-licenses.yml@v1 diff --git a/template.rb b/template.rb index b8779fe..85c9777 100644 --- a/template.rb +++ b/template.rb @@ -493,6 +493,7 @@ def run get("#{BASE_URL}/build.yml", '.github/workflows/build.yml') get("#{BASE_URL}/delete-cache.yml", '.github/workflows/delete-cache.yml') +get("#{BASE_URL}/scan-licenses.yml", '.github/workflows/scan-licenses.yml') ## Docker if no?('Will this application use Docker? [Yes]', :green)