Skip to content

Commit

Permalink
ci: add github actions
Browse files Browse the repository at this point in the history
Signed-off-by: chenzhixiang <[email protected]>
  • Loading branch information
chenzhixiang committed Jan 14, 2023
1 parent 41b2aeb commit cf42046
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Image

on:
push:
tags:
- v*

jobs:
release:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command

- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: build

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/horizon-web:${{ github.ref_name }}

0 comments on commit cf42046

Please sign in to comment.