Skip to content

Deploy Dashboard

Deploy Dashboard #7

Workflow file for this run

name: Deploy Dashboard
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: read
packages: write
env:
NAME: ghcr.io/phantasmlabs/phantasm/dashboard
jobs:
publish-image:
environment: Dashboard
name: Publish Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get Package Version
run: |
cd dashboard
VERSION=$(npm pkg get version | tr -d '\"')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Log in to GitHub Container Registry
run: echo $PASSWORD | docker login ghcr.io -u $USER --password-stdin
env:
USER: ${{ github.actor }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker Image
run: docker build -t $NAME:$VERSION -t $NAME:latest ./dashboard
- name: Push Docker Image to GHCR
run: |
docker push $NAME:$VERSION
docker push $NAME:latest