[change] action workflow & dockerfile
This commit is contained in:
parent
f5e9920dbc
commit
c062c6f8ee
7 changed files with 15 additions and 9 deletions
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
|
||||
- name: Get Version
|
||||
run: |
|
||||
echo VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g") >> $GITHUB_ENV
|
||||
echo VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g")-dev >> $GITHUB_ENV
|
||||
|
||||
- name: Check Version
|
||||
run: echo $VERSION
|
||||
|
|
|
|||
4
.github/workflows/release-linux.yml
vendored
4
.github/workflows/release-linux.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
tags:
|
||||
description: "Version tags"
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [v0.10.3-dev]
|
||||
paths:
|
||||
- "share/const.go"
|
||||
|
||||
|
|
@ -108,6 +108,8 @@ jobs:
|
|||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: v0.10.3-dev
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v3
|
||||
|
|
|
|||
4
.github/workflows/release-macos.yml
vendored
4
.github/workflows/release-macos.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
tags:
|
||||
description: "Version tags"
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [v0.10.3-dev]
|
||||
paths:
|
||||
- "share/const.go"
|
||||
|
||||
|
|
@ -105,6 +105,8 @@ jobs:
|
|||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: v0.10.3-dev
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v3
|
||||
|
|
|
|||
6
.github/workflows/unit-test.yml
vendored
6
.github/workflows/unit-test.yml
vendored
|
|
@ -4,9 +4,9 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs:
|
||||
tags:
|
||||
description: "Comment"
|
||||
description: "Version"
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [v0.10.3-dev]
|
||||
|
||||
env:
|
||||
YAO_DEV: ${{ github.WORKSPACE }}
|
||||
|
|
@ -133,6 +133,8 @@ jobs:
|
|||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: v0.10.3-dev
|
||||
|
||||
- name: Start Redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -174,7 +174,7 @@ artifacts-linux: clean
|
|||
mv dist/yao-*-* dist/release/
|
||||
chmod +x dist/release/yao-*-*
|
||||
ls -l dist/release/
|
||||
dist/release/yao-${VERSION}-linux-amd64 version
|
||||
dist/release/yao-${VERSION}-dev-linux-amd64 version
|
||||
|
||||
# Reset const
|
||||
# cp -f share/const.goe share/const.go
|
||||
|
|
@ -224,7 +224,7 @@ artifacts-macos: clean
|
|||
mv dist/yao-*-* dist/release/
|
||||
chmod +x dist/release/yao-*-*
|
||||
ls -l dist/release/
|
||||
dist/release/yao-${VERSION}-darwin-amd64 version
|
||||
dist/release/yao-${VERSION}-dev-darwin-amd64 version
|
||||
|
||||
# Reset const
|
||||
# cp -f share/const.goe share/const.go
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ ARG ARCH
|
|||
RUN groupadd -r yao && useradd -r -g yao yao && \
|
||||
apt-get update && \
|
||||
apt-get install -y curl sudo procps net-tools
|
||||
RUN curl -fsSL "https://release-sv-1252011659.cos.na-siliconvalley.myqcloud.com/archives/yao-${VERSION}-linux-${ARCH}" > /usr/local/bin/yao && \
|
||||
RUN curl -fsSL "https://release-sv-1252011659.cos.na-siliconvalley.myqcloud.com/archives/yao-${VERSION}-dev-linux-${ARCH}" > /usr/local/bin/yao && \
|
||||
chmod +x /usr/local/bin/yao && \
|
||||
mkdir -p /data/app
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ FROM alpine:latest
|
|||
ARG VERSION
|
||||
ARG ARCH
|
||||
RUN apk --no-cache add curl
|
||||
RUN curl -fsSL "https://release-sv-1252011659.cos.na-siliconvalley.myqcloud.com/archives/yao-${VERSION}-linux-${ARCH}" > /usr/local/bin/yao && \
|
||||
RUN curl -fsSL "https://release-sv-1252011659.cos.na-siliconvalley.myqcloud.com/archives/yao-${VERSION}-dev-linux-${ARCH}" > /usr/local/bin/yao && \
|
||||
chmod +x /usr/local/bin/yao
|
||||
RUN mkdir -p /data/app
|
||||
VOLUME /data/app
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue