| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 22cbf49 commit 4791017
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,3 @@ | |||
| 1 | - # `dist/index.js` is a special file in Actions. | ||
| 2 | - # When you reference an action with `uses:` in a workflow, | ||
| 3 | - # `index.js` is the code that will run. | ||
| 4 | - # For our project, we generate this file through a build process | ||
| 5 | - # from other source files. | ||
| 6 | - # We need to make sure the checked-in `index.js` actually matches what we expect it to be. | ||
| 7 | 1 | name: Check dist/ | |
| 8 | 2 | ||
| 9 | 3 | on: | |
@@ -18,33 +12,6 @@ on: | |||
| 18 | 12 | workflow_dispatch: | |
| 19 | 13 | ||
| 20 | 14 | jobs: | |
| 21 | - check-dist: | ||
| 22 | - runs-on: ubuntu-latest | ||
| 23 | - | ||
| 24 | - steps: | ||
| 25 | - - uses: actions/checkout@v3 | ||
| 26 | - - name: Setup Node.js 16.x | ||
| 27 | - uses: actions/setup-node@v3 | ||
| 28 | - with: | ||
| 29 | - node-version: 16.x | ||
| 30 | - cache: npm | ||
| 31 | - - name: Install dependencies | ||
| 32 | - run: npm ci | ||
| 33 | - - name: Rebuild the dist/ directory | ||
| 34 | - run: npm run build | ||
| 35 | - | ||
| 36 | - - name: Compare the expected and actual dist/ directories | ||
| 37 | - run: | | ||
| 38 | - if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
| 39 | - echo "Detected uncommitted changes after build. See status below:" | ||
| 40 | - git diff | ||
| 41 | - exit 1 | ||
| 42 | - fi | ||
| 43 | - id: diff | ||
| 44 | - | ||
| 45 | - # If index.js was different than expected, upload the expected version as an artifact | ||
| 46 | - - uses: actions/upload-artifact@v3 | ||
| 47 | - if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
| 48 | - with: | ||
| 49 | - name: dist | ||
| 50 | - path: dist/ | ||
| 15 | + call-check-dist: | ||
| 16 | + name: Check dist/ | ||
| 17 | + uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,18 +7,9 @@ on: | |||
| 7 | 7 | pull_request: | |
| 8 | 8 | branches: | |
| 9 | 9 | - main | |
| 10 | + workflow_dispatch: | ||
| 10 | 11 | ||
| 11 | 12 | jobs: | |
| 12 | - test: | ||
| 13 | - runs-on: ubuntu-latest | ||
| 14 | - name: Check licenses | ||
| 15 | - steps: | ||
| 16 | - - uses: actions/checkout@v3 | ||
| 17 | - - run: npm ci | ||
| 18 | - - name: Install licensed | ||
| 19 | - run: | | ||
| 20 | - cd $RUNNER_TEMP | ||
| 21 | - curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz | ||
| 22 | - sudo tar -xzf licensed.tar.gz | ||
| 23 | - sudo mv licensed /usr/local/bin/licensed | ||
| 24 | - - run: licensed status | ||
| 13 | + call-licensed: | ||
| 14 | + name: Licensed | ||
| 15 | + uses: actions/reusable-workflows/.github/workflows/licensed.yml@main | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments