Merge pull request #291 from YeungHoiChiu/vite-config #80
Workflow file for this run
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: deploy to dockerHub | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
create: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: softprops/action-gh-release@v1 | |
with: | |
draft: false | |
generate_release_notes: true | |
build: | |
needs: create | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: 'Get Previous tag' | |
id: previoustag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
- name: replace version | |
run: sed -i "s/SONIC_VERSION/${{ steps.previoustag.outputs.tag }}/g" index.html | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
cache: 'npm' | |
- run: npm cache clear --force && npm install | |
- run: npm run build | |
- name: login docker hub | |
run: echo "${{ secrets.ACCESS_TOKEN }}" | docker login -u zhouyixun --password-stdin | |
- name: build docker image | |
run: docker build -t sonicorg/sonic-client-web:${{ steps.previoustag.outputs.tag }} . | |
- name: push docker image | |
run: docker push sonicorg/sonic-client-web:${{ steps.previoustag.outputs.tag }} |