dev review #159
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build develop | |
on: | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Build core and deploy it to Docker Hub | |
core: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set version # Write version to package.json and manifest.json | |
run: | | |
echo "Setting version to \"develop (${{ github.sha }})\"" | |
find \( -name "package.json" -o -name "manifest.json" \) -not -path "*/node_modules/*" -not -path "*/__tests__/*" -type f -exec sh -c 'jq ".version = \"develop (${{ github.sha }})\"" {} > tmpfile && mv tmpfile {}' \; | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: docker/DOCKERFILES/build/core.Dockerfile | |
labels: | |
LEAV Engine | |
Core | |
tags: "leavengine/core:develop" | |
# Build preview-generator and deploy it to Docker Hub | |
preview-generator: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set version # Write version to package.json and manifest.json | |
run: | | |
echo "Setting version to \"develop (${{ github.sha }})\"" | |
find \( -name "package.json" -o -name "manifest.json" \) -not -path "*/node_modules/*" -not -path "*/__tests__/*" -type f -exec sh -c 'jq ".version = \"develop (${{ github.sha }})\"" {} > tmpfile && mv tmpfile {}' \; | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
target: runner-preview-generator | |
file: docker/DOCKERFILES/build/generic.Dockerfile | |
build-args: | | |
"APP=preview-generator" | |
labels: | |
LEAV Engine | |
Preview Generator | |
tags: "leavengine/preview-generator:develop" | |
# Build automate-scan and deploy it to Docker Hub | |
automate-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set version # Write version to package.json and manifest.json | |
run: | | |
echo "Setting version to \"develop (${{ github.sha }})\"" | |
find \( -name "package.json" -o -name "manifest.json" \) -not -path "*/node_modules/*" -not -path "*/__tests__/*" -type f -exec sh -c 'jq ".version = \"develop (${{ github.sha }})\"" {} > tmpfile && mv tmpfile {}' \; | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
target: runner | |
file: docker/DOCKERFILES/build/generic.Dockerfile | |
build-args: | | |
"APP=automate-scan" | |
labels: | |
LEAV Engine | |
Automate Scan | |
tags: "leavengine/automate-scan:develop" | |
# Build sync-scan and deploy it to Docker Hub | |
sync-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set version # Write version to package.json and manifest.json | |
run: | | |
echo "Setting version to \"develop (${{ github.sha }})\"" | |
find \( -name "package.json" -o -name "manifest.json" \) -not -path "*/node_modules/*" -not -path "*/__tests__/*" -type f -exec sh -c 'jq ".version = \"develop (${{ github.sha }})\"" {} > tmpfile && mv tmpfile {}' \; | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
target: runner | |
file: docker/DOCKERFILES/build/generic.Dockerfile | |
build-args: | | |
"APP=sync-scan" | |
labels: | |
LEAV Engine | |
Sync scan | |
tags: "leavengine/sync-scan:develop" | |
# Build logs-collector and deploy it to Docker Hub | |
logs-collector: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set version # Write version to package.json and manifest.json | |
run: | | |
echo "Setting version to \"develop (${{ github.sha }})\"" | |
find \( -name "package.json" -o -name "manifest.json" \) -not -path "*/node_modules/*" -not -path "*/__tests__/*" -type f -exec sh -c 'jq ".version = \"develop (${{ github.sha }})\"" {} > tmpfile && mv tmpfile {}' \; | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
target: runner | |
file: docker/DOCKERFILES/build/generic.Dockerfile | |
build-args: | | |
"APP=logs-collector" | |
labels: | |
LEAV Engine | |
Logs Collector | |
tags: "leavengine/logs-collector:develop" |