Skip to content

Instantly share code, notes, and snippets.

@lucianghinda
Created July 26, 2020 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucianghinda/ec2681838dd64886fc525afbcf0e07ff to your computer and use it in GitHub Desktop.
Save lucianghinda/ec2681838dd64886fc525afbcf0e07ff to your computer and use it in GitHub Desktop.
Github Actions Workflow to verify if included packages licenses are allowed
name: Verify Licenses
on: [push]
jobs:
licenses:
name: Verify Gem Licenses
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
- name: Cache gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-licensed-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-licensed-
- name: Install gems
run: |
sudo apt-get install libsqlite3-dev
bundle config path vendor/bundle
bundle config set with 'licensed'
bundle install --jobs 4 --retry 3
- name: Update licenses list in cache
run: bundle exec licensed cache
- name: Check gems and npm modules
run: bundle exec licensed status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment