Skip to content

migrate from CRA to Vite #35

migrate from CRA to Vite

migrate from CRA to Vite #35

Workflow file for this run

name: Docker builds
on:
push:
branches:
- "ghost"
workflow_dispatch: # adding the workflow_dispatch so it can be triggered manually
pull_request:
jobs:
ui:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: true
- name: Set outputs
id: vars
run: |
echo "date=$(date +%Y-%m-%dT%H-%M-%S)" >> "${GITHUB_OUTPUT}"
echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}"
- name: Set up Docker Buildx
uses: docker/Setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
if: ${{ github.ref == 'refs/heads/ghost' }}
uses: docker/build-push-action@v3
with:
file: ./solution/Dockerfile
# Only push when on ghost
push: ${{ github.ref == 'refs/heads/ghost' && github.event_name == 'push' }}
tags: |
ghcr.io/marigold-dev/winefactory:latest
ghcr.io/marigold-dev/winefactory:${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.sha_short }}
cache-from: type=gha
cache-to: type=gha,mode=max