seepine 82198e8c5b
Some checks failed
Gitea Actions Demo / Gitea-Actions (push) Failing after 10s
Gitea Actions Demo / setup (push) Successful in 1m57s
Gitea Actions Demo / test (push) Successful in 44s
Gitea Actions Demo / build (push) Successful in 42s
fix
2023-08-02 10:29:57 +08:00

101 lines
2.2 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
outputs:
hash: ${{ steps.get-hash.outputs.hash }}
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: |
**/package.json
**/yarn.lock
- 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
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: |
**/package.json
**/yarn.lock
- 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
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
- run: corepack enable
- name: Hash files
id: get-hash
uses: https://gitea.com/seepine/hash-files@v1
with:
patterns: |
**/package.json
**/yarn.lock
- 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