Bump eslint-plugin-perfectionist from 3.7.0 to 4.6.0 in /dashboard #448
Workflow file for this run
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: UpdateReact | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: [ "dashboard/**", ".github/workflows/update-react.yml" ] | |
pull_request: | |
branches: | |
- main | |
paths: [ "dashboard/**", ".github/workflows/update-react.yml" ] | |
concurrency: | |
# Cancel any workflow currently in progress for the same PR. | |
# Allow running concurrently with any other commits. | |
group: update-react-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
npm-build: | |
name: Npm build | |
needs: [] | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: NPM install | |
working-directory: dashboard | |
run: npm install | |
- name: NPM build | |
working-directory: dashboard | |
run: npm run build | |
- name: Upload Dist | |
if: ${{ always() }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 | |
with: | |
name: dist | |
path: dashboard/dist | |
update-react: | |
# Only update when this run is from a merge to main | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
permissions: write-all | |
name: Update React | |
needs: [npm-build] | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
repository: microsoft/netperf | |
ref: deploy | |
- name: Remove 'dist' directory if it exists | |
run: | | |
if [[ -d dist ]]; then | |
echo "Removing 'dist' directory..." | |
rm -rf dist | |
else | |
echo "'dist' directory does not exist. Skipping removal." | |
fi | |
- name: Remove 404 html file if it exists | |
run: | | |
if [[ -f 404.html ]]; then | |
echo "Removing 404.html file..." | |
rm 404.html | |
else | |
echo "404.html file does not exist. Skipping removal." | |
fi | |
- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d | |
with: | |
name: dist | |
path: ./dist | |
- run: ls | |
- run: pwd | |
- run: cp dist/index.html 404.html | |
- name: Commit changes | |
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch') | |
run: | | |
git status | |
git config user.name 'QUIC Dev[bot]' | |
git config user.email '[email protected]' | |
git add dist | |
git add 404.html | |
git status | |
git commit -m "Update React" | |
git push |