From c8c376ebbb50bd35624e1f59826cc6c055fe735e Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 28 Aug 2019 17:25:36 -0400 Subject: [PATCH 1/4] Add a licensed workflow --- .github/workflows/licensed.yml | 17 +++++++++++++++++ README.md | 1 + 2 files changed, 18 insertions(+) create mode 100644 .github/workflows/licensed.yml diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml new file mode 100644 index 0000000..4fee6d5 --- /dev/null +++ b/.github/workflows/licensed.yml @@ -0,0 +1,17 @@ +name: Licensed + +on: + push: {branches: master} + pull_request: {branches: master} + repository_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + name: Check licenses + steps: + - uses: actions/checkout@v1.0.0 + - uses: actions/setup-ruby@v1.0.2 + with: {ruby-version: 3.x} + - run: gem install licensed + - run: licensed status diff --git a/README.md b/README.md index 687cfbe..a9b7432 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # setup-elixir [![](https://github.com/actions/setup-elixir/workflows/Test/badge.svg)](https://github.com/actions/setup-elixir/actions) +[![](https://github.com/actions/setup-elixir/workflows/Licensed/badge.svg)](https://github.com/actions/setup-elixir/actions) This actions sets up an Elixir environment for use in Actions by: From 8b75b3d52eef378e3e778e932689ea5ed02447c3 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 28 Aug 2019 17:27:18 -0400 Subject: [PATCH 2/4] Use Ruby 2.x --- .github/workflows/licensed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 4fee6d5..4820edc 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -12,6 +12,6 @@ jobs: steps: - uses: actions/checkout@v1.0.0 - uses: actions/setup-ruby@v1.0.2 - with: {ruby-version: 3.x} + with: {ruby-version: 2.x} - run: gem install licensed - run: licensed status From d8384307ce21a5097fa3d5181b0eef33a7c3053b Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 28 Aug 2019 17:35:18 -0400 Subject: [PATCH 3/4] Use Licensed without Ruby --- .github/workflows/licensed.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index 4820edc..e89a3e0 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -11,7 +11,9 @@ jobs: name: Check licenses steps: - uses: actions/checkout@v1.0.0 - - uses: actions/setup-ruby@v1.0.2 - with: {ruby-version: 2.x} - - run: gem install licensed + - run: |- + cd /tmp + curl -fs https://github.com/github/licensed/releases/download/2.3.2/licensed-2.3.2-linux-x64.tar.gz + tar -xzfv licensed-2.3.2-linux-x64.tar.gz + sudo mv licensed-2.3.2-linux-x64/licensed /usr/local/bin/licensed - run: licensed status From cf30cd9eeb8302f1dc7d124d55ddec04eabfd1af Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 28 Aug 2019 17:37:38 -0400 Subject: [PATCH 4/4] Curl to file --- .github/workflows/licensed.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index e89a3e0..ee9408d 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v1.0.0 - run: |- cd /tmp - curl -fs https://github.com/github/licensed/releases/download/2.3.2/licensed-2.3.2-linux-x64.tar.gz - tar -xzfv licensed-2.3.2-linux-x64.tar.gz - sudo mv licensed-2.3.2-linux-x64/licensed /usr/local/bin/licensed + curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.3.2/licensed-2.3.2-linux-x64.tar.gz + sudo tar -xzf licensed.tar.gz + sudo mv licensed /usr/local/bin/licensed - run: licensed status