74 lines
2.2 KiB
YAML
74 lines
2.2 KiB
YAML
name: Build elsa-dashboard:latest
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- feature/elsa-2.0
|
|
#release:
|
|
# types: [published]
|
|
|
|
jobs:
|
|
push_to_registry:
|
|
name: Push Docker image to GitHub Packages
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install NPM dependencies
|
|
uses: bahmutov/npm-install@v1
|
|
with:
|
|
useRollingCache: true
|
|
working-directory: |
|
|
src/designer/elsa-workflows-studio
|
|
src/designer/bindings/aspnet/Elsa.Designer.Components.Web
|
|
|
|
- name: Build NPM packages for elsa-workflows-studio
|
|
run: npm run build
|
|
working-directory: src/designer/elsa-workflows-studio
|
|
|
|
- name: Build NPM packages for Elsa.Designer.Components.Web
|
|
run: npm run build
|
|
working-directory: src/designer/bindings/aspnet/Elsa.Designer.Components.Web
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
with:
|
|
platforms: all
|
|
|
|
- name: Set up Docker Buildx
|
|
id: buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Cache Docker layers
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.CR_PAT }}
|
|
|
|
- name: Build and push
|
|
id: docker_build
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
context: .
|
|
file: ./docker/Dockerfile
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
|
push: true
|
|
tags: ghcr.io/elsa-workflows/elsa-core/elsa-dashboard:latest
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
|
|
|
- name: Image digest
|
|
run: echo ${{ steps.docker_build.outputs.digest }}
|