Skip to content

Commit

Permalink
Merge pull request #10 from jonabc/releases/v1.0.1
Browse files Browse the repository at this point in the history
Release v1.0.1
  • Loading branch information
jonabc authored Aug 5, 2020
2 parents 575f832 + f97697f commit 53aaf68
Show file tree
Hide file tree
Showing 10 changed files with 15,212 additions and 1,919 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/update_licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,13 @@ jobs:
uses: ./
with:
version: '2.x'
github_token: ${{ secrets.GITHUB_TOKEN }}

- run: licensed cache
- name: Push cached file updates
run: |
git config --global user.name "github/licensed"
git config --global user.email "[email protected]"
git remote set-url origin "https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
BRANCH="$(echo "$GITHUB_REF" | sed 's,refs/heads/\(.*\),\1,')"
git checkout "$BRANCH"
git add .licenses
if ! git diff-index --quiet HEAD -- .licenses; then
git commit -m "Auto-update cached data"
git push --set-upstream origin "$BRANCH"
fi
env:
GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }}
- uses: jonabc/licensed-ci@v1
with:
workflow: branch
github_token: ${{ secrets.GITHUB_TOKEN }}
cleanup_on_success: 'true'

- run: licensed status
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bower_components
build/Release

# Dependency directories
# node_modules/
node_modules/
jspm_packages/

# TypeScript v1 declaration files
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# setup-licensed

Set up [github/licensed](https://github.com/github/licensed) for use in actions. Installs an executable for the specified `version` input and target platform.
Set up [github/licensed](https://github.com/github/licensed) for use in actions by installing an executable for the specified `version` input and target platform.

The action will fail if an licensed package isn't available for the specified version and target platform. Licensed is currently supported on macOS and linux platforms.
The action will fail if a licensed package isn't available for the specified version and target platform. Licensed is currently supported on macOS and linux platforms.

**Note**: this action will overwrite any version of the github/licensed executable already installed at the `install-dir` input.

Expand All @@ -18,6 +18,7 @@ steps:
with:
version: '2.x' # required: must satisfy semver.validRange
install-dir: /path/to/install/at # optional: defaults to /usr/local/bin
github_token: # optional: allows users to make authenticated requests to GitHub's APIs
- run: npm install # install dependencies in local environment
- run: licensed list
```
Expand Down
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: 'Setup github/licensed'
description: 'Setup github/licensed for use in GitHub Actions workflows'
branding:
icon: check
color: green
color: green
inputs:
github_token:
description: 'Authentication token to use with the GitHub API'
required: false
version:
description: 'The github/licensed version to install'
required: true
Expand All @@ -13,4 +16,4 @@ inputs:
required: false
runs:
using: 'node12'
main: 'lib/index.js'
main: 'dist/index.js'
Loading

0 comments on commit 53aaf68

Please sign in to comment.