Merge remote-tracking branch 'origin/demodesk-client-v3' into v3

This commit is contained in:
Miroslav Šedivý
2024-06-23 17:57:19 +02:00
161 changed files with 26015 additions and 17 deletions

95
.github/workflows/client_tags.yml vendored Normal file
View File

@ -0,0 +1,95 @@
name: Build and Publish package on tags
on:
push:
tags:
- 'v*'
env:
NODE_VERSION: '16.x'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies and build
run: cd ./client/ && npm ci && npm run build
- name: Prepare Artifact
run: |
cd ./client/
mkdir artifact
cp LICENSE README.md package.json artifact
cp -r dist artifact/dist
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: package
path: client/artifact
publish-to-npm-pkg-github-com:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [ build ]
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: package
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://npm.pkg.github.com'
- name: Publish package to npm.pkg.github.com
run: cd ./client/ && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-to-registry-npmjs-org:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [ build ]
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: package
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Replace npm.pkg.github.com with registry.npmjs.org
run: sed -i 's/npm\.pkg\.github\.com/registry\.npmjs\.org/' client/package.json
- name: Publish package to registry.npmjs.org
run: cd ./client/ &&npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

View File

@ -6,7 +6,7 @@ on:
- master
jobs:
build-image:
build-server:
runs-on: ubuntu-latest
permissions:
contents: read
@ -18,4 +18,22 @@ jobs:
- name: Build Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
context: ./server
build-client:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build
run: cd ./client && npm install && npm run build

View File

@ -38,7 +38,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
context: ./server/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -46,7 +46,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
context: ./server/
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}