Skip to content

Commit

Permalink
[TSI-2537] Add license check for phrase-go
Browse files Browse the repository at this point in the history
  • Loading branch information
jablan committed Jul 23, 2024
1 parent 7154430 commit c9f4f4e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: License Check
on:
push:
branches:
- tsi-2537-license-check

jobs:
lawa:
name: lawa
runs-on: ubuntu-latest
steps:
- name: Checkout app
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Set up Ruby
uses: ruby/setup-ruby@0cde4689ba33c09f1b890c1725572ad96751a3fc # [email protected]
with:
ruby-version: 3.1.3
env:
BUNDLE_GITHUB__COM: x-access-token:${{ secrets.github-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', :git => 'https://github.com/phrase/lawa.git'" >> 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.github-token }}
- name: Run lawa
run: BUNDLE_GEMFILE=Gemfile.lawa bundle _2.1.4_ exec lawa --enabled-package-managers=gomodules --decisions-file=.license-decisions.yml
env:
GITHUB_TOKEN: ${{ secrets.github-token }}
4 changes: 4 additions & 0 deletions .license-decisions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- - :inherit_from
- url: https://raw.githubusercontent.com/phrase/lawa/master/config/license-decisions.yml
authorization: token $GITHUB_TOKEN

0 comments on commit c9f4f4e

Please sign in to comment.