use same ruby and bundler versions as in phrase project #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: License check CI | |
on: [ push ] | |
jobs: | |
lawa: | |
name: lawa | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout app | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Cache app node modules | |
uses: actions/cache@v2 | |
with: | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
path: ./node_modules | |
restore-keys: | | |
${{ runner.os }}-npm | |
- name: Set auth token | |
run: echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Install NPM dependencies | |
run: | | |
npm install | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@c7079efafd956afb5d823e8999c2506e1053aefa | |
with: | |
ruby-version: 3.0.3 | |
env: | |
BUNDLE_GITHUB__COM: x-access-token:${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Install compatible bundler version | |
run: gem install bundler:2.1.4 | |
- name: Install lawa | |
run: | | |
touch Gemfile.lawa | |
echo "source 'https://rubygems.org'" >> Gemfile.lawa | |
echo -e "gem 'lawa', github: 'phrase/lawa'" >> Gemfile.lawa | |
bundle _2.1.4_ config unset deployment | |
BUNDLE_GEMFILE=Gemfile.lawa bundle _2.1.4_ install | |
env: | |
BUNDLE_GITHUB__COM: x-access-token:${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Run lawa | |
run: | | |
BUNDLE_GEMFILE=Gemfile.lawa bundle _2.1.4_ exec lawa --project-path=. --enabled-package-managers=npm --decisions-file=config/license-decisions.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |