mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-10-29 15:25:01 -04:00
77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
name: dockersimple-builder
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- dockersimple
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository || 'MeshCentral' }}
|
|
REGISTRY_USERNAME: ${{ github.repository_owner || 'meshcentral-extensions' }}
|
|
|
|
jobs:
|
|
build-images:
|
|
name: Build Docker Images
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "lts/*"
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ env.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.MY_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
github-token: ${{ secrets.MY_TOKEN }}
|
|
env:
|
|
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
|
|
|
|
- name: Install Translate Packages (allowed to fail)
|
|
working-directory: ./translate
|
|
run: node translate.js || true
|
|
|
|
- name: Run extractall
|
|
working-directory: ./translate
|
|
run: node translate.js extractall
|
|
|
|
- name: Run minifyall
|
|
working-directory: ./translate
|
|
run: node translate.js minifyall
|
|
|
|
- name: Run translateall
|
|
working-directory: ./translate
|
|
run: node translate.js translateall
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: docker/Dockerfile
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|