Skip to content

Daily dev :: Publish #357

Daily dev :: Publish

Daily dev :: Publish #357

name: "Daily dev :: Publish"
on:
schedule:
- cron: "0 4 * * *" # 4am UTC everyday
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/daily_dev_publish.yml"
concurrency:
group: ${{ github.event.pull_request && format('daily-dev-publish-pr-{0}', github.event.pull_request.number) || format('daily-dev-publish-ref-{0}', github.ref_name) }}
cancel-in-progress: true
jobs:
build:
if: github.repository == 'kiegroup/serverless-logic-sandbox-deployment'
runs-on: ubuntu-latest
env:
KIE_TOOLS_BUILD__buildContainerImages: "false"
KIE_TOOLS_BUILD__runLinters: "false"
KIE_TOOLS_BUILD__runTests: "false"
KIE_TOOLS_BUILD__runEndToEndTests: "false"
DASHBUILDER__viewerImageRegistry: "docker.io"
DASHBUILDER__viewerImageAccount: "apache"
DASHBUILDER__viewerImageName: "incubator-kie-dashbuilder-viewer"
SERVERLESS_LOGIC_WEB_TOOLS__dashbuilderViewerImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry: "docker.io"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount: "apache"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName: "incubator-kie-serverless-logic-web-tools-swf-builder"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry: "docker.io"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount: "apache"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName: "incubator-kie-serverless-logic-web-tools-base-builder"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageRegistry: "quay.io"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageAccount: "kubesmarts"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageName: "incubator-kie-serverless-logic-web-tools-swf-dev-mode"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageTag: "main"
SERVERLESS_LOGIC_WEB_TOOLS__corsProxyUrl: "https://daily-dev-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud"
steps:
- name: "Clone kie-tools"
uses: actions/checkout@v3
with:
path: kie-tools
repository: apache/incubator-kie-tools
# This bash script will set an output version for this step. It can be used with steps.version.outputs.version
- name: "Output version"
id: version
run: |
cd kie-tools
echo "version=$(node -e "console.log(require('./package.json').version);")" >> $GITHUB_OUTPUT
shell: bash
- name: "Cache Maven packages"
if: github.event_name != 'pull_request'
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: ~/.m2
key: ${{ runner.os }}-daily-dev-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-daily-dev-m2
- name: "Setup environment"
uses: ./kie-tools/.github/actions/setup-env
with:
working_dir: kie-tools
- name: "Bootstrap"
id: bootstrap
uses: ./kie-tools/.github/actions/bootstrap
with:
working_dir: kie-tools
- name: "Parse `commit_sha`"
id: commit_sha
shell: bash
run: |
cd kie-tools
echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: "Build serverless-logic-web-tools"
env:
WEBPACK__minimize: "true"
WEBPACK__tsLoaderTranspileOnly: "false"
SERVERLESS_LOGIC_WEB_TOOLS__buildInfo: "${{ steps.version.outputs.version }} (daily-dev) @ ${{ steps.commit_sha.outputs.commit_sha }}"
run: |
cd kie-tools
pnpm -F @kie-tools/serverless-logic-web-tools... build:prod
- name: "Checkout serverless-logic-sandbox-deployment"
uses: actions/checkout@v3
with:
token: ${{ github.event_name != 'pull_request' && secrets.KIE_GROUP_TOOLS_TOKEN || secrets.GITHUB_TOKEN }}
path: serverless-logic-sandbox-deployment
repository: kiegroup/serverless-logic-sandbox-deployment
ref: gh-pages
- name: "Update serverless-logic-sandbox-deployment resources"
if: github.event_name != 'pull_request'
run: |
cd serverless-logic-sandbox-deployment
rm -rf dev
mkdir dev
cp -r ../kie-tools/packages/serverless-logic-web-tools/dist/* dev/
git config --global user.email "[email protected]"
git config --global user.name "KIE Group Tools (kie-group-tools)"
today=$(date -I)
git add . && git commit -m "KIE Tools Daily Dev Build resources - $today" || echo "No changes."
git push origin gh-pages
cd -