59 lines
1.2 KiB
YAML
Raw Normal View History

2023-08-01 16:22:27 +08:00
name: Gitea Actions Demo
on: [push]
jobs:
2023-08-01 18:41:05 +08:00
2023-08-01 16:22:27 +08:00
setup:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
2023-08-01 18:41:05 +08:00
env:
RUNNER_TOOL_CACHE: /toolcache
2023-08-02 09:29:06 +08:00
outputs:
hash: ${{ steps.get-hash.outputs.hash }}
2023-08-01 16:22:27 +08:00
steps:
2023-08-01 18:44:09 +08:00
- name: Checkout
2023-08-01 16:22:27 +08:00
uses: actions/checkout@v3
with:
2023-08-01 18:41:05 +08:00
fetch-depth: 1
2023-08-02 11:08:34 +08:00
- name: Yarn install
uses: ./.gitea/actions/yarn-install
2023-08-01 18:41:05 +08:00
test:
2023-08-01 16:22:27 +08:00
needs: setup
2023-08-02 10:29:57 +08:00
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
2023-08-01 16:22:27 +08:00
steps:
2023-08-01 21:11:02 +08:00
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
2023-08-01 18:41:05 +08:00
2023-08-02 11:08:34 +08:00
- name: Yarn install
uses: ./.gitea/actions/yarn-install
2023-08-02 10:29:57 +08:00
2023-08-02 11:08:34 +08:00
- name: Eslint Test
run: npx eslint --ext ".vue,.js,.jsx,.ts,.tsx"
2023-08-01 18:41:05 +08:00
build:
2023-08-01 16:22:27 +08:00
needs: setup
2023-08-02 10:25:48 +08:00
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
2023-08-02 09:35:18 +08:00
env:
2023-08-02 10:25:48 +08:00
RUNNER_TOOL_CACHE: /toolcache
2023-08-01 16:22:27 +08:00
steps:
2023-08-01 21:12:15 +08:00
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
2023-08-01 18:41:05 +08:00
2023-08-02 11:08:34 +08:00
- name: Yarn install
uses: ./.gitea/actions/yarn-install
2023-08-01 20:51:02 +08:00
2023-08-02 11:08:34 +08:00
- name: Eslint Test
run: npx eslint --ext ".vue,.js,.jsx,.ts,.tsx"