-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.9 KB
/
Copy pathdotnet.yml
File metadata and controls
60 lines (57 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: node builder
on:
push:
branches:
- master
tags:
- v*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v3
#- uses: actions/setup-node@v4
# with:
# node-version: 20.11.1
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: true
- name: env info
run: ls & pwd
- name: Get version
id: get_version
run: echo APP_VERSION=`git describe --tags --always` >> $GITHUB_ENV
- name: build
run: pnpm build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#- name: Login to Aliyun Container Registry (ACR)
#uses: aliyun/acr-login@v1 # 使用阿里云镜像服务action
#with:
#login-server: registry.cn-shanghai.aliyuncs.com # 务必正确填写镜像容器服务的登录地址
#region-id: cn-shanghai # 务必正确填写镜像容器服务的登录地址
#username: "${{ secrets.REGISTRY_USERNAME }}" # 引用GitHub repo设置的镜像容器服务用户名
#password: "${{ secrets.REGISTRY_PASSWORD }}" # 引用GitHub repo设置的镜像容器服务密码
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
hyfree/frontend:${{env.APP_VERSION}}