Generate metadata #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate metadata | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 0 * * * # every day at 00:00 | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: yarn | |
- name: Locate licenses | |
env: | |
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }} | |
GH_ORG: ${{ github.repository_owner }} | |
NPM_REGISTRY_URLS: https://registry.npmjs.org | |
CRATES_REGISTRY_URLS: https://crates.io | |
run: | | |
yarn build | |
yarn start | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.ROBOT_TOKEN }} | |
repository: ${{ github.repository_owner }}/third-party-licences | |
path: third-party-licences | |
- name: Update dependency metadata | |
working-directory: third-party-licences | |
run: | | |
rm -rf ./data | |
mv ../dep-data ./data | |
git add data | |
- name: Commit and push changes | |
uses: actions-js/push@master | |
with: | |
github_token: ${{ secrets.ROBOT_TOKEN }} | |
repository: ${{ github.repository_owner }}/third-party-licences | |
author_email: [email protected] | |
author_name: dothq-robot | |
message: "π Update license data" | |
directory: third-party-licences |