0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/.github/workflows/static-data.yml
Alex 17984fa31b
GitHub Workflows security hardening (#3470)
* build: harden docker-publish.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden website.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden changesets.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden static-data.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-11-12 07:42:01 +01:00

58 lines
1.8 KiB
YAML

---
name: static data
on:
workflow_dispatch:
schedule:
# twice peer week
- cron: '0 0 * * 1,4'
# for now, scheduled, we can enable on push master but not make much sense now
# push:
# branches:
# - master
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
prepare:
name: Run script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 18.x
- name: install pnpm
run: sudo npm i pnpm@latest-6 -g
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: setup pnpm config registry
run: pnpm config set registry https://registry.verdaccio.org
- name: install dependencies
run: pnpm install
- name: Build Translations percentage
run: pnpm build --filter "@verdaccio/crowdin-translations"
- name: update contributors
run: pnpm run contributors
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: update translations
run: pnpm run translations
env:
TOKEN: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
- name: format
run: pnpm format
- name: Commit & Push changes
uses: actions-js/push@a52398fac807b0c1e5f1492c969b477c8560a0ba # tag=v1.3
with:
github_token: ${{ secrets.TOKEN_VERDACCIOBOT_GITHUB }}
message: "chore: updated static data"
branch: master
author_email: verdaccio.npm@gmail.com
author_name: verdacciobot