mirror of
https://github.com/actions/labeler.git
synced 2025-12-27 21:37:22 +08:00
Workflow automatically updates license cache when package-lock.json changes (#155)
This commit is contained in:
32
.github/workflows/update_license_cache.yml
vendored
Normal file
32
.github/workflows/update_license_cache.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# Updates our cache of license files in response to changes to our dependencies
|
||||
# declared in package-lock.json. Automatically commits the changes and pushes
|
||||
# them to your branch. NB `check_license_status` should always run *after* this
|
||||
#
|
||||
# see https://github.com/actions/labeler/pull/155 for more context
|
||||
|
||||
name: Update License Cache
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths: [package-lock.json]
|
||||
pull_request:
|
||||
branches: main
|
||||
paths: package-lock.json
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update_licenses_cache:
|
||||
runs-on: ubuntu-latest
|
||||
name: Update License Cache
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: jonabc/setup-licensed@v1
|
||||
with:
|
||||
version: '2.x'
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: npm install --production
|
||||
- uses: jonabc/licensed-ci@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user