huanghs 9ed97b1898
Some checks failed
Gitea Actions Demo / Gitea-Actions (push) Successful in 20s
Gitea Actions Demo / build (push) Failing after 21s
Gitea Actions Demo / test (push) Failing after 23s
Gitea Actions Demo / setup (push) Failing after 30s
更新 .gitea/workflows/multiple.yml
2023-08-01 23:39:18 +08:00

74 lines
1.6 KiB
YAML

name: Gitea Actions Demo
on: [push]
jobs:
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
- run: corepack enable
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Hash files
id: get-hash
uses: https://github.com/seepine/hash-files@v1
patterns: '**/yarn.lock'
- run: echo ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
- name: Dependent installation
run: yarn install
test:
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Dependent installation
run: yarn install
build:
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: Dependent installation
run: yarn install