1 Commits

Author SHA1 Message Date
30da36b5af 更新 README.md
Some checks failed
Gitea Actions Demo / build-docker (push) Has been cancelled
Gitea Actions Demo / Gitea-Actions (push) Has been cancelled
build / build (10.x) (push) Has been cancelled
build / build (16.x) (push) Has been cancelled
build / build (18.x) (push) Has been cancelled
Gitea Actions Demo / setup (push) Has been cancelled
Gitea Actions Demo / test (push) Has been cancelled
Gitea Actions Demo / build (push) Has been cancelled
Test pull_request_target / setup (pull_request) Successful in 7s
Test pull_request / setup (pull_request) Successful in 1m15s
2024-07-01 16:55:01 +08:00
9 changed files with 179 additions and 51 deletions

View File

@@ -6,14 +6,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Docker build push
uses: seepine/action-docker-build-push@v1
with:
push: false
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
uses: ./.gitea/actions/action-docker-build-push
- run: echo The end

View File

@@ -0,0 +1,50 @@
name: Gitea Actions Demo
on: [push]
jobs:
Gitea-Actions:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
volumes:
- ubuntu_hostedtoolcache:/opt/hostedtoolcache
steps:
- name: Checkout
uses: actions/checkout@v3
- run: cat README.md
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: repo.io/${GITHUB_REPOSITORY}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- run: cat ${{ steps.meta.outputs.bake-file }}
- run: |
echo ${{ steps.meta.outputs.tags }}
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- run: java -version
- name: Setup Pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- run: pnpm -v
- run: pnpm install

View File

@@ -1,27 +0,0 @@
name: Cache Npx
on: [push]
env:
DOCKER_REGISTRY: git.zgfxrc.cn
DOCKER_USERNAME: huanghs
jobs:
task:
runs-on: yfb-test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get npm cache dir
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- run: echo "${{ steps.npm-cache-dir.outputs.dir }}"
- name: Cache npx
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}/_npx
key: ${{ runner.os }}-npx-2
- run: npx cloc .

View File

@@ -0,0 +1,23 @@
name: build
on:
push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x,16.x,18.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# 安装依赖
- name: Node Version
run: node -v

View File

@@ -0,0 +1,102 @@
name: Gitea Actions Demo
on: [push]
jobs:
setup:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Corepack enable
run: corepack enable
- name: Hash files
id: get-hash
uses: 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
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Corepack enable
run: corepack enable
- name: Hash files
id: get-hash
uses: 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
- 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
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Corepack enable
run: corepack enable
- name: Hash files
id: get-hash
uses: 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
- name: Eslint Test
run: npx eslint --ext ".vue,.js,.jsx,.ts,.tsx"

1
.npmrc
View File

@@ -1 +0,0 @@
registry=https://registry.npmmirror.com

View File

@@ -1,3 +1,5 @@
# action-demo
ww
ww
adddddddd

1
dist/index.html vendored
View File

@@ -1 +0,0 @@
Hello World!

View File

@@ -1,14 +0,0 @@
FROM nginx:1.25-alpine-slim
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk add --no-cache tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& apk del tzdata \
&& echo "*/30 * * * * ntpd -d -q -n -p ntp.aliyun.com" >> /etc/crontabs/root
ENV LISTEN_PORT=80\
SERVER_NAME=localhost\
PROXY_PASS=http://127.0.0.1
COPY ./dist /html
RUN chmod -R 755 /html