fix
Some checks failed
Gitea Actions Demo / Gitea-Actions (push) Failing after 26s
Gitea Actions Demo / test (push) Successful in 5m29s
Gitea Actions Demo / build (push) Successful in 5m27s
Gitea Actions Demo / setup (push) Successful in 20m26s

This commit is contained in:
huanghs 2023-08-02 12:43:38 +08:00
parent 45b79478ff
commit 9f747846e8
3 changed files with 68 additions and 10 deletions

View File

@ -5,22 +5,22 @@ runs:
using: 'composite' using: 'composite'
steps: steps:
- name: Corepack enable - run: corepack enable
run: corepack enable
- name: Hash files - uses: seepine/hash-files@v1
id: get-hash id: get-hash
uses: seepine/hash-files@v1
with: with:
patterns: | patterns: |
**/package.json **/package.json
**/yarn.lock **/yarn.lock
- name: Cache node modules - uses: actions/cache@v3
uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }} key: ${{ runner.os }}-yarn-install-${{ steps.get-hash.outputs.hash }}
- name: Dependent installation - run: echo install start
run: yarn install
- run: yarn install
- run: echo install end

View File

@ -0,0 +1,58 @@
name: Gitea Actions Demo
on: [push]
jobs:
setup:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
outputs:
hash: ${{ steps.get-hash.outputs.hash }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Yarn install
uses: ./.gitea/actions/yarn-install
test:
needs: setup
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Yarn install
uses: ./.gitea/actions/yarn-install
- name: Eslint Test
run: npx eslint --ext ".vue,.js,.jsx,.ts,.tsx"
build:
needs: setup
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Yarn install
uses: ./.gitea/actions/yarn-install
- name: Eslint Test
run: npx eslint --ext ".vue,.js,.jsx,.ts,.tsx"

View File

@ -61,7 +61,7 @@
"sass": "^1.57.1", "sass": "^1.57.1",
"typescript": "^4.9.2", "typescript": "^4.9.2",
"unplugin-auto-import": "^0.16.6", "unplugin-auto-import": "^0.16.6",
"vite": "4.0.4", "vite": "4.0.3",
"vue-tsc": "^1.0.24" "vue-tsc": "^1.0.24"
}, },
"lint-staged": { "lint-staged": {