Skip to content

Commit

Permalink
ci: update build release
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Sep 22, 2023
1 parent ecafb07 commit 0b55c88
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build-release-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: |
cd web
npm install
- name: Build web
run: |
cd web
npm run build
- name: judge has env GITHUB_REF # 如果没有GITHUB_REF环境变量,则把github.ref变量赋值给GITHUB_REF
run: |
if [ -z "$GITHUB_REF" ]; then
Expand All @@ -24,7 +36,7 @@ jobs:
id: get_version
if: (startsWith(env.GITHUB_REF, 'refs/tags/')||startsWith(github.ref, 'refs/tags/')) && startsWith(github.repository, 'RockChinQ/free-one-api')
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build # image name: rockchin/free-one-api:<VERSION>
- name: Build image # image name: rockchin/free-one-api:<VERSION>
run: docker build --network=host -t rockchin/free-one-api:${{ steps.get_version.outputs.VERSION }} .
- name: Login to Registry
run: docker login --username=${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}
Expand Down

0 comments on commit 0b55c88

Please sign in to comment.