支持JT1078转GB,通过HTTP接口汇报车辆上下线。 #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get versions | |
id: version | |
run: | | |
echo "::set-output name=major::$(awk -F, '{print $2}' .tags)" | |
echo "::set-output name=full::$(awk -F, '{print $1}' .tags)" | |
- name: Setup Node.js v14.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
working-directory: ./ui | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: yarn Install | |
run: yarn install --frozen-lockfile | |
working-directory: ./ui | |
#- uses: actions/cache@v3 | |
# with: | |
# # 缓存文件夹 | |
# path: ui/node_modules/.cache/webpack/ | |
# key: ${{ github.ref.name }}-webpack-build | |
# # 兜底使用 "main" 分支缓存 | |
# restore-keys: | | |
# main-webpack-build | |
- name: Build UI | |
working-directory: ./ui | |
run: yarn build && rsync -a dist/* ../GBWeb/wwwroot/ | |
- name: Docker Setup qemu-action | |
uses: docker/setup-qemu-action@v1 | |
- name: Docker Setup Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: DockerHub Login | |
uses: docker/login-action@v1.6.0 | |
with: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build the Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./GBWeb/Dockerfile | |
platforms: linux/amd64,linux/arm/v7,linux/arm64 | |
push: true | |
tags: | | |
vanjoge/gbsip:latest |