Skip to content

Refactor code to remove isExecuted property in NotebookModel.js and C… #183

Refactor code to remove isExecuted property in NotebookModel.js and C…

Refactor code to remove isExecuted property in NotebookModel.js and C… #183

Workflow file for this run

name: Build Examples
# Controls when the workflow will run
on:
push:
paths:
- 'examples/**'
pull_request:
paths:
- 'examples/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
deploy-example:
type: choice
description: Example to Deploy
options:
- None
- WordCount
jobs:
build-examples:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a set of commands using the runners shell
- name: Maven Package
run: |
cd examples/word-count
mvn clean package
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
timestamp=$(date +"%Y%m%d%H%M%S")
version_with_timestamp="${version}-${timestamp}"
echo "Version with timestamp: $version_with_timestamp"
echo "VERSION=$version" >> $GITHUB_ENV
echo "VERSION_WITH_TIMESTAMP=$version_with_timestamp" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker Build & Push
run: |
cd examples/word-count
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/word-count:$VERSION_WITH_TIMESTAMP --build-arg VERSION=$VERSION .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/word-count:$VERSION_WITH_TIMESTAMP