Compare commits
1 Commits
v1.1.5
...
huanghs-pa
Author | SHA1 | Date | |
---|---|---|---|
30da36b5af |
@@ -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
|
50
.gitea/workflows/build.yaml
Normal file
50
.gitea/workflows/build.yaml
Normal 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
|
@@ -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 .
|
||||
|
23
.gitea/workflows/matrix-node.yaml
Normal file
23
.gitea/workflows/matrix-node.yaml
Normal 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
|
102
.gitea/workflows/multiple.yml
Normal file
102
.gitea/workflows/multiple.yml
Normal 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
dist/index.html
vendored
1
dist/index.html
vendored
@@ -1 +0,0 @@
|
||||
Hello World!
|
@@ -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
|
Reference in New Issue
Block a user