Skip to content

fix(): Launchpad 搜索报错 #1083

fix(): Launchpad 搜索报错

fix(): Launchpad 搜索报错 #1083

name: Update dll manifest
on:
pull_request:
types: [labeled]
jobs:
update:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
# Only if it contains a certain label.
if: "contains( github.event.pull_request.labels.*.name, 'eve: update dll manifest')"
steps:
- name: Update labels
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN_EVE }}
script: |
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'eve: update dll manifest',
});
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['[bot]: updating dll manifest'],
});
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN_EVE }}
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- run: git checkout --track origin/${{ github.event.pull_request.head.ref }}
- run: |
git config --global user.name 'easyops-eve'
git config --global user.email 'easyops-eve@users.noreply.github.com'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Cache nx cache
uses: actions/cache@v3
with:
path: .cache
key: ${{ runner.os }}-nx-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-nx-
- name: Build to update dll manifest
run: |
yarn install --frozen-lockfile
yarn build
env:
UPDATE_DLL_MANIFEST: 'true'
- name: Git commit and push
run: |
git add -A
git commit -m "chore(): update dll manifest"
git push
- name: Post update labels
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_TOKEN_EVE }}
script: |
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: '[bot]: updating dll manifest',
});
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['[bot]: updated dll manifest'],
});