smartfile/.gitea/workflows/default_nottags.yaml

67 lines
1.7 KiB
YAML
Raw Normal View History

2023-06-25 15:47:42 +00:00
name: Default (not tags)
2023-06-23 14:44:44 +00:00
2023-06-25 11:55:03 +00:00
on:
push:
2023-06-25 15:47:42 +00:00
tags-ignore:
- '**'
2023-06-23 14:44:44 +00:00
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
2023-10-12 00:21:39 +00:00
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
2023-06-23 23:26:08 +00:00
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
2023-06-24 18:36:52 +00:00
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
2023-06-23 14:44:44 +00:00
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
2023-06-23 16:43:49 +00:00
image: ${{ env.IMAGE }}
2023-06-23 14:44:44 +00:00
steps:
2023-10-12 00:21:39 +00:00
- uses: actions/checkout@v3
2023-06-23 14:44:44 +00:00
2023-10-12 00:21:39 +00:00
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
2023-06-23 14:44:44 +00:00
2023-10-12 00:21:39 +00:00
- name: Run npm prepare
run: npmci npm prepare
2023-06-23 14:44:44 +00:00
2023-10-12 00:21:39 +00:00
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
2023-06-23 14:44:44 +00:00
2023-10-12 00:21:39 +00:00
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
2023-06-23 14:44:44 +00:00
test:
2023-06-24 23:34:40 +00:00
if: ${{ always() }}
2023-06-23 14:44:44 +00:00
needs: security
runs-on: ubuntu-latest
container:
2023-06-23 16:43:49 +00:00
image: ${{ env.IMAGE }}
2023-06-23 14:44:44 +00:00
steps:
2023-10-12 00:21:39 +00:00
- uses: actions/checkout@v3
2023-06-23 14:44:44 +00:00
2023-10-12 00:21:39 +00:00
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
2023-06-23 14:44:44 +00:00
2023-10-12 00:21:39 +00:00
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build