huanghs 588677dc4d
All checks were successful
Gitea Actions Demo / Gitea-Actions (push) Successful in 25s
Gitea Actions Demo / setup (push) Successful in 27s
Gitea Actions Demo / test (push) Successful in 15s
Gitea Actions Demo / build (push) Successful in 14s
更新 .gitea/workflows/multiple.yml
2023-08-02 00:45:16 +08:00

72 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: Hash files
id: get-hash
uses: https://gitea.com/seepine/hash-files@v1
with:
patterns: |
**/yarn.lock
- run: echo "${{ steps.get-hash.outputs.hash }}"
- run: echo "${{ runner.os }}"
- 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-${{ needs.setup.get-hash.outputs.hash }}
- 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-${{ needs.setup.get-hash.outputs.hash }}
- name: Dependent installation
run: yarn install