build dashboard image #5
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: build dashboard image | |
on: | |
workflow_dispatch: | |
inputs: | |
image_tag: | |
description: 'dashboard image tag' | |
required: false | |
type: string | |
jobs: | |
publish-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set Node.js 18.18.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
- name: Run yarn install | |
uses: borales/actions-yarn@v4 | |
with: | |
dir: dashboard-ui | |
cmd: install # will run `yarn install` command | |
- name: Build dashboard | |
run: make dashboard-dist | |
- name: Login Docker Hub | |
env: | |
PASSWORD: ${{ secrets.DOCKERHUB_FUSE_ACCESS_TOKEN }} | |
run: docker login --username chnliyong --password ${PASSWORD} | |
- name: build dashboard image and push | |
env: | |
DASHBOARD_TAG: ${{ inputs.image_tag }} | |
run: | | |
export DOCKER_CLI_EXPERIMENTAL=enabled | |
docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d | |
docker buildx create --use --name mybuilder | |
make -C docker dashboard-buildx | |
- name: Setup upterm session | |
if: ${{ failure() }} | |
timeout-minutes: 60 | |
uses: lhotari/action-upterm@v1 |