Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 53aaf68

Browse files
authored
Merge pull request #10 from jonabc/releases/v1.0.1
Release v1.0.1
2 parents 575f832 + f97697f commit 53aaf68

File tree

10 files changed

+15212
-1919
lines changed

10 files changed

+15212
-1919
lines changed

.github/workflows/update_licenses.yaml

+6-16
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,13 @@ jobs:
1818
uses: ./
1919
with:
2020
version: '2.x'
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
2122

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

4030
- run: licensed status

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bower_components
3333
build/Release
3434

3535
# Dependency directories
36-
# node_modules/
36+
node_modules/
3737
jspm_packages/
3838

3939
# TypeScript v1 declaration files

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# setup-licensed
22

3-
Set up [github/licensed](https://github.com/github/licensed) for use in actions. Installs an executable for the specified `version` input and target platform.
3+
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.
44

5-
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.
5+
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.
66

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

@@ -18,6 +18,7 @@ steps:
1818
with:
1919
version: '2.x' # required: must satisfy semver.validRange
2020
install-dir: /path/to/install/at # optional: defaults to /usr/local/bin
21+
github_token: # optional: allows users to make authenticated requests to GitHub's APIs
2122
- run: npm install # install dependencies in local environment
2223
- run: licensed list
2324
```

action.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ name: 'Setup github/licensed'
22
description: 'Setup github/licensed for use in GitHub Actions workflows'
33
branding:
44
icon: check
5-
color: green
5+
color: green
66
inputs:
7+
github_token:
8+
description: 'Authentication token to use with the GitHub API'
9+
required: false
710
version:
811
description: 'The github/licensed version to install'
912
required: true
@@ -13,4 +16,4 @@ inputs:
1316
required: false
1417
runs:
1518
using: 'node12'
16-
main: 'lib/index.js'
19+
main: 'dist/index.js'

0 commit comments

Comments
 (0)