build

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: build

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install tox tox-gh-actions
    - name: Test with tox
      run: tox

    #   run: |
    #     python -m pip install --upgrade pip
    #     python -m pip install flake8 pytest
    #     if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
    # - name: Lint with flake8
    #   run: |
    #     # stop the build if there are Python syntax errors or undefined names
    #     flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
    #     # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
    #     flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
    # - name: Test with pytest
    #   run: |
    #     pytest


Upload Python Package

# This workflow will upload a Python Package using Twine when a tag is created and all tests run successfully
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
  workflow_run:
    workflows: ["build tag"]
    # branches: [main]
    types:
      - completed

jobs:
  deploy:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build and publish
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*


Build images for GHCR

name: Build images for GHCR
on: [push]
env:
  # NOTE keep versions in sync with version in TOSCA templates
  TERRAFORM_VERSION: 1.1.4 # sync with tosca_plugins/artifacts.yaml
  HELM_VERSION: 3.7.1 # sync with configurators/helm-template.yaml
  GCLOUD_VERSION: 398.0.0 # sync with tosca_plugins/artifacts.yaml and Dockerfile
  KOMPOSE_VERSION: v1.26.1 # sync with Dockerfile
  KUBECTL_VERSION: v1.24.2
  K3D_VERSION: v4.4.6

jobs:
  publish_ghcr:
    runs-on: ubuntu-latest
    steps:
      - name: Fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0

      - name: Log in to registry
        uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
        with:
          registry: https://ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v4
        with:
          images: |
            ghcr.io/onecommons/unfurl
          # commit sha, branch name, tag name, latest on main
          tags: |
            type=sha,prefix=
            type=ref,event=branch
            type=ref,event=tag
            type=raw,value=latest,enable={{is_default_branch}}

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v4
        with:
          context: ./
          file: ./docker/Dockerfile
          push: true
          build-args: |
            HELM_VERSION=${{ env.HELM_VERSION }}
            TERRAFORM_VERSION=${{ env.TERRAFORM_VERSION }}
            GCLOUD_VERSION=${{ env.GCLOUD_VERSION }}
            KOMPOSE_VERSION=${{ env.KOMPOSE_VERSION }}
          tags: ${{ steps.meta.outputs.tags }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

  publish_ghcr_server:
    runs-on: ubuntu-latest
    steps:
      - name: Fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0

      - name: Log in to registry
        uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
        with:
          registry: https://ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v4
        with:
          images: |
            ghcr.io/onecommons/unfurl
          # commit sha, branch name, tag name, latest on main
          tags: |
            type=sha,prefix=,suffix=-server
            type=ref,event=branch,suffix=-server
            type=ref,event=tag,suffix=-server
            type=raw,value=latest,suffix=-server,enable={{is_default_branch}}

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v4
        with:
          context: ./
          file: ./docker/Dockerfile.server
          push: true
          build-args: |
            HELM_VERSION=${{ env.HELM_VERSION }}
            TERRAFORM_VERSION=${{ env.TERRAFORM_VERSION }}
            GCLOUD_VERSION=${{ env.GCLOUD_VERSION }}
            KOMPOSE_VERSION=${{ env.KOMPOSE_VERSION }}
          tags: ${{ steps.meta.outputs.tags }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

  publish_ghcr_server_nginx:
    runs-on: ubuntu-latest
    needs: publish_ghcr_server
    steps:
      - name: Fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0

      - name: Log in to registry
        uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
        with:
          registry: https://ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v4
        with:
          images: |
            ghcr.io/onecommons/unfurl
          # commit sha, branch name, tag name, latest on main
          tags: |
            type=sha,prefix=,suffix=-server-cached
            type=ref,event=branch,suffix=-server-cached
            type=ref,event=tag,suffix=-server-cached
            type=raw,value=latest,suffix=-server-cached,enable={{is_default_branch}}

      - name: Extract short sha
        id: extract
        # GH's github.sha is the full ref hash, not the short one
        run: |
          echo "sha_short=$(echo "${{ github.sha }}" | head -c 7)" >> $GITHUB_OUTPUT

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v4
        with:
          context: ./
          file: ./docker/Dockerfile.server-cached
          push: true
          build-args: |
            FROM_TAG=${{ steps.extract.outputs.sha_short }}-server
          tags: ${{ steps.meta.outputs.tags }}
          cache-from: type=gha
          cache-to: type=gha,mode=max


Test and Build

name: Test and Build
on: [push]
env:
  # NOTE keep versions in sync with version in TOSCA templates
  TERRAFORM_VERSION: 1.1.4 # sync with tosca_plugins/artifacts.yaml
  HELM_VERSION: 3.7.1 # sync with configurators/helm-template.yaml
  GCLOUD_VERSION: 398.0.0 # sync with tosca_plugins/artifacts.yaml and Dockerfile
  KOMPOSE_VERSION: v1.26.1 # sync with Dockerfile
  KUBECTL_VERSION: v1.24.2
  K3D_VERSION: v4.4.6
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: [3.8, 3.9, "3.10", "3.11.0", "3.12"]
    env:
      TOX_SKIP_ENV: .+(docker|lock)
      UNFURL_LOGGING: info
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
          fetch-depth: 0
      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python }}
          check-latest: true
      - name: Setup Terraform
        uses: hashicorp/setup-terraform@v3
        with:
          terraform_version: ${{ env.TERRAFORM_VERSION }}
          terraform_wrapper: false
      - name: Setup helm
        uses: Azure/setup-helm@v4.0.0
        with:
          version: ${{ env.HELM_VERSION }}
      - name: Setup kubectl
        uses: Azure/setup-kubectl@v4.0.0
        with:
          version: ${{ env.KUBECTL_VERSION }}
      - name: Setup kompose
        run: |
          wget https://github.com/kubernetes/kompose/releases/download/${KOMPOSE_VERSION}/kompose-linux-amd64
          chmod +x kompose-linux-amd64
          sudo mv kompose-linux-amd64 /usr/local/bin/kompose
      - name: Setup k3d
        run: |
          wget https://github.com/rancher/k3d/releases/download/"${{ env.K3D_VERSION }}"/k3d-linux-amd64
          chmod +x k3d-linux-amd64
          sudo mv k3d-linux-amd64 /usr/local/bin/k3d
      - name: Set up the cluster
        run: |
          k3d cluster create
          kubectl get node
          k3d kubeconfig merge --all -d
          kubectl config view
      - name: Install Tox and any other packages
        run: pip install tox==3.28.0
      - name: Run mypy and Tox
        # Run tox using the version of Python in `PATH`
        run: |
          git config --global user.email "unittest@onecommons.org"
          git config --global user.name "Test Robot"
          git config --global push.autoSetupRemote true
          git config --global init.defaultBranch main
          export PY_V=py3`python -c "import sys; print(sys.version_info.minor, end='')"`
          tox -c tosca-parser/tox.ini -v -e $PY_V
          tox -e $PY_V -v -- -vv -n auto --dist loadfile
          .tox/$PY_V/bin/mypy unfurl
      - name: build docs
        if: matrix.python == 3.9
        run: tox -e docs -- -W --keep-going
      - name: upload docs
        if: matrix.python == 3.9
        uses: actions/upload-artifact@v3
        with:
          name: DocumentationHTML
          path: .tox/docs/html/

  publish_dockerhub:
    needs: test
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    env:
      DOCKERHUB_USER: "ocbuilds"
    # Map a step output to a job output
    outputs:
      release: ${{ steps.get_tag_name.outputs.release }}
    steps:
      - name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ env.DOCKERHUB_USER }}
          password: ${{ secrets.DOCKER_HUB }}
      - name: Fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0
      - name: Get the tag name or abbreviated commit digest
        id: get_tag_name
        run: |
          label=$(git describe --contains --always --match=v*)
          echo "tag=${label%^0}" >> $GITHUB_OUTPUT
          if [[ $label =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,4}.0$ ]]; then
              echo "release=true" >> $GITHUB_OUTPUT
          fi
      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v4
        with:
          images: |
            onecommons/unfurl
          tags: |
            type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
            type=raw,value=stable,enable=${{ steps.get_tag_name.outputs.release || 'false' }}
            type=raw,value=${{ steps.get_tag_name.outputs.tag }}
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v4
        with:
          context: ./
          file: ./docker/Dockerfile
          push: true
          build-args: |
            HELM_VERSION=${{ env.HELM_VERSION }}
            TERRAFORM_VERSION=${{ env.TERRAFORM_VERSION }}
            GCLOUD_VERSION=${{ env.GCLOUD_VERSION }}
            KOMPOSE_VERSION=${{ env.KOMPOSE_VERSION }}
          tags: ${{ steps.meta.outputs.tags }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

  publish_dockerhub_server:
    needs: test
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    env:
      DOCKERHUB_USER: "ocbuilds"
    steps:
      - name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ env.DOCKERHUB_USER }}
          password: ${{ secrets.DOCKER_HUB }}
      - name: Fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0
      - name: Get the tag name or abbreviated commit digest
        id: get_tag_name
        run: |
          label=$(git describe --contains --always --match=v*)
          echo "tag=${label%^0}" >> $GITHUB_OUTPUT
          if [[ $label =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,4}.0$ ]]; then
              echo "release=true" >> $GITHUB_OUTPUT
          fi
      - name: Docker meta for unfurl server
        id: meta_server
        uses: docker/metadata-action@v4
        with:
          images: |
            onecommons/unfurl
          tags: |
            type=raw,value=latest-server,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
            type=raw,value=stable-server,enable=${{ steps.get_tag_name.outputs.release || 'false' }}
            type=raw,value=${{ steps.get_tag_name.outputs.tag }}-server
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      - name: Build and push unfurl server
        id: docker_build_server
        uses: docker/build-push-action@v4
        with:
          context: ./
          file: ./docker/Dockerfile.server
          push: true
          tags: ${{ steps.meta_server.outputs.tags }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

  publish_dockerhub_nginx:
    needs: [test, publish_dockerhub_server]
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    env:
      DOCKERHUB_USER: "ocbuilds"
    steps:
      - name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ env.DOCKERHUB_USER }}
          password: ${{ secrets.DOCKER_HUB }}
      - name: Fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0
      - name: Get the tag name or abbreviated commit digest
        id: get_tag_name
        run: |
          label=$(git describe --contains --always --match=v*)
          echo "tag=${label%^0}" >> $GITHUB_OUTPUT
          if [[ $label =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,4}.0$ ]]; then
              echo "release=true" >> $GITHUB_OUTPUT
          fi
      - name: Docker meta for unfurl server
        id: meta_server
        uses: docker/metadata-action@v4
        with:
          images: |
            onecommons/unfurl
          tags: |
            type=raw,value=latest-server-cached,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
            type=raw,value=stable-server-cached,enable=${{ steps.get_tag_name.outputs.release || 'false' }}
            type=raw,value=${{ steps.get_tag_name.outputs.tag }}-server-cached
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      - name: Build and push unfurl server
        id: docker_build_server
        uses: docker/build-push-action@v4
        with:
          context: ./
          file: ./docker/Dockerfile.server-cached
          push: true
          build-args: |
            FROM_IMAGE=docker.io/onecommons/unfurl
            FROM_TAG=${{ steps.get_tag_name.outputs.tag }}-server
          tags: ${{ steps.meta_server.outputs.tags }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

  publish_dockerhub_podman:
    needs: publish_dockerhub
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    env:
      DOCKERHUB_USER: "ocbuilds"
    steps:
      - name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ env.DOCKERHUB_USER }}
          password: ${{ secrets.DOCKER_HUB }}
      - name: fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0
      - name: Get the tag name or abbreviated commit digest
        id: get_tag_name
        run: |
          label=$(git describe --contains --always --match=v*)
          echo "tag=${label%^0}" >> $GITHUB_OUTPUT
          if [[ $label =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,4}.0$ ]]; then
              echo "release=true" >> $GITHUB_OUTPUT
          fi
      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v4
        with:
          images: |
            onecommons/unfurl
          tags: |
            type=raw,value=latest-podman,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
            type=raw,value=stable-podman,enable=${{ steps.get_tag_name.outputs.release || 'false' }}
            type=raw,value=${{ steps.get_tag_name.outputs.tag }}-podman
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v4
        with:
          context: ./
          file: ./docker/Dockerfile.podman
          push: true
          build-args: |
            HELM_VERSION=${{ env.HELM_VERSION }}
            TERRAFORM_VERSION=${{ env.TERRAFORM_VERSION }}
            GCLOUD_VERSION=${{ env.GCLOUD_VERSION }}
            KOMPOSE_VERSION=${{ env.KOMPOSE_VERSION }}
            UNFURL_TAG=${{ steps.get_tag_name.outputs.tag }}
          tags: ${{ steps.meta.outputs.tags }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

  publish_pypi:
    needs: publish_dockerhub
    if: needs.publish_dockerhub.outputs.release
    runs-on: ubuntu-latest
    steps:
      - name: fetch repo
        uses: actions/checkout@v3
        with:
          submodules: recursive
          fetch-depth: 0
      - name: build python package
        run: python setup.py sdist bdist_wheel
      - name: release to pypi
        uses: pypa/gh-action-pypi-publish@v1.6.4
        with:
          user: __token__
          password: ${{ secrets.PYPI }}
          verbose: true

  docs:
    needs: publish_dockerhub
    if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/publish-docs'
    runs-on: ubuntu-latest
    steps:
      - name: Download documentation
        uses: actions/download-artifact@v3
        with:
          name: DocumentationHTML
          path: build
      - name: Commit documentation changes
        run: |
          git clone ${{github.server_url}}/${{github.repository}} --branch gh-pages --single-branch gh-pages
          cp -r build/* gh-pages/
          cd gh-pages
          touch .nojekyll
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          git add .
          git commit -m "Update documentation" -a || true
          # The above command will fail if no changes were present, so we ignore
          # that.
      - name: Push docs to gh-pages branch
        uses: ad-m/github-push-action@master
        with:
          branch: gh-pages
          directory: gh-pages
          github_token: ${{ secrets.GITHUB_TOKEN }}


docs

name: docs

concurrency: docs

on:
  push:
    branches: [develop, release]
    paths:
      - docs/**
      - mkdocs.yml
      - mkdocs.base.yml
      - .github/workflows/docs.yml
  pull_request:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Track Docs Branch
        run: git branch docs -t origin/docs
      - uses: actions/setup-python@v4
        with:
          python-version: 3.x
      - uses: actions/cache@v3
        with:
          key: ${{ github.ref }}
          path: .cache
      - uses: pnpm/action-setup@v2
        with:
          version: 8
      - name: Lint Docs
        run: |
          pnpm i
          pnpm lint
      - name: Update pip
        run: python -m pip install -U pip setuptools
      - name: Set Git author
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
      - name: Install native dependencies
        run: sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
      - name: Install wheel
        run: pip install wheel
      - name: Install Material for MkDocs Insiders
        run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
        if: ${{ github.repository_owner == 'mastercomfig' && github.event_name == 'push' && false }}
        env:
          GH_TOKEN: ${{secrets.PRIVATE_REPO_TOKEN}}
      - name: Install dependencies
        run: pip install -r docs/requirements.txt
      - name: Update from Remote
        run: git fetch --tags -f
      - name: Build docs (latest)
        if: ${{ github.repository_owner == 'mastercomfig' && github.event_name == 'push' && github.ref == 'refs/heads/release' }}
        run: mike deploy --alias-type copy -b docs -up $(git describe --tags --abbrev=0) latest page
        env:
          GH_TOKEN: ${{secrets.PRIVATE_REPO_TOKEN}}
          MKDOCS_GIT_COMMITTERS_APIKEY: ${{secrets.PRIVATE_REPO_TOKEN}}
      - name: Build docs (develop)
        if: ${{ github.repository_owner == 'mastercomfig' && github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
        run: mike deploy --alias-type copy -b docs -p dev
        env:
          GH_TOKEN: ${{secrets.PRIVATE_REPO_TOKEN}}
          MKDOCS_GIT_COMMITTERS_APIKEY: ${{secrets.PRIVATE_REPO_TOKEN}}
      - name: Build docs
        if: ${{ github.event_name == 'pull_request' }}
        run: mike deploy --config-file mkdocs.base.yml -u $(git describe --tags) latest


CI

name: CI

on:
  workflow_dispatch:
    inputs:
      patch:
        description: "Patch"
        required: true
        type: string
        default: "true"
  push:
    branches: [develop]
    paths-ignore:
      - "docs/**"
      - ".github/**"
      - ".remarkrc"
      - ".gitignore"
      - "**.md"
      - "**.yml"
      - "**.json"
      - "!.github/workflows/main.yml"
      - "!data/**"
    tags: ["**"]
  pull_request:

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v4
        with:
          clean: false
      - name: Install dependencies
        run: |
          pip install vpk
          rm -f /home/runner/.local/bin/vpk
          sudo bash -c 'cat <<\EOF > /usr/local/bin/vpk
          #!/bin/bash
          python "$GITHUB_WORKSPACE/dev/vpk_cli.py" "${@}"
          EOF'
          sudo chmod +x /usr/local/bin/vpk
      - name: Check tag
        id: check-tag
        if: ${{ github.event_name == 'push' }}
        run: |
          if [[ ${{ github.event.ref }} == refs/tags/* ]]; then
            echo "release=true" >> $GITHUB_OUTPUT
          fi
      - name: Build mastercomfig (prerelease)
        run: dev/release.sh
        if: ${{ github.event_name == 'push' && steps.check-tag.outputs.release != 'true' }}
        env:
          prerelease: true
          GH_TOKEN: ${{secrets.REPO_TOKEN}}
      - name: Build mastercomfig (patch)
        run: dev/release.sh
        if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.patch == 'true' }}
        env:
          patch: true
          GH_TOKEN: ${{secrets.REPO_TOKEN}}
      - name: Build mastercomfig (release)
        run: dev/release.sh
        if: ${{ github.event_name == 'push' && steps.check-tag.outputs.release == 'true' }}
        env:
          DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
          GH_TOKEN: ${{secrets.REPO_TOKEN}}
      - name: Build mastercomfig
        run: dev/package.sh
        if: ${{ github.event_name == 'pull_request' }}


Start Release

name: Start Release

on:
  workflow_dispatch:
    inputs:
      version:
        description: "Version"
        required: true
      highlights:
        description: "Highlights"
        required: true
      hours:
        description: "Hours taken"
        required: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          token: ${{ secrets.REPO_TOKEN }}
          fetch-depth: 0
      - name: Update release info
        run: |
          {
            echo "${{ github.event.inputs.version }}"
            echo "${{ github.event.inputs.highlights }}"
            echo "${{ github.event.inputs.hours }}"
            echo ""
          } > dev/info.txt
      - name: Commit release info
        run: |
          git config user.email "support@mastercomfig.com"
          git config user.name "mastercoms"
          git commit -am "release ${{ github.event.inputs.version }}" || true
      - name: Switch to release
        run: git checkout release
      - name: Merge ref into release
        run: git merge ${GITHUB_REF##*/}
      - name: Tag release
        run: git tag ${{ github.event.inputs.version }}
      - name: Push release
        run: git push --atomic origin release ${{ github.event.inputs.version }}


Merge release -> develop

name: Merge release -> develop

on:
  push:
    branches: [release]

jobs:
  merge:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Merge release -> develop
        uses: everlytic/branch-merge@master
        with:
          target_branch: develop
          github_token: ${{ secrets.REPO_TOKEN }}


Python package

name: Python package

on:
  - push
  - pull_request

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.8', '3.10', '3.11']
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install codecov tox tox-gh-actions
    - name: Lint with tox
      run: tox -e pep8
    - name: Test with tox
      run: tox -e py3
    - name: Codecov
      run: |
        set -euxo pipefail
        codecov --verbose --gcov-glob unit_tests/*
  func:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        juju_channel:
          - 2.9/stable
          # - 3.1/stable
          # - 3.2/stable
          # - 3.3/stable
          - 3.4/stable
        bundle:
          - first
          - second
          - third
        include:
          - juju_channel: 2.9/stable
            snap_install_flags: "--classic"
            pip_constraints: constraints-juju29.txt
          # - juju_channel: 3.1/stable
          #   snap_install_flags: ""
          #   pip_constraints: constraints-juju31.txt
          # NOTE(freyes): disabled until "RuntimeError: set_wakeup_fd only works
          # in main thread of the main interpreter" gets fixed.
          # https://pastebin.ubuntu.com/p/GfYKgpx3SP/
          #
          # - juju_channel: 3.2/stable
          #   snap_install_flags: ""
          #   pip_constraints: constraints-juju32.txt
          # - juju_channel: 3.3/stable
          #   snap_install_flags: ""
          #   pip_constraints: constraints-juju33.txt
          - juju_channel: 3.4/stable
            snap_install_flags: ""
            pip_constraints: constraints-juju34.txt
            juju3: 1
    env:
      TEST_ZAZA_BUG_LP1987332: "on"  # http://pad.lv/1987332
    needs: build
    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies
      run: |
        set -euxo pipefail
        sudo apt-get update
        sudo apt-get install -yq snapd
        sudo systemctl enable snapd
        sudo systemctl restart snapd
        python -m pip install --upgrade pip
        pip install tox tox-gh-actions
        sudo snap install ${{ matrix.snap_install_flags }} --channel ${{ matrix.juju_channel }} juju
        sudo snap install --classic juju-crashdump
        sudo lxd init --auto
        # This is a throw-away CI environment, do not do this at home
        sudo chmod 666 /var/snap/lxd/common/lxd/unix.socket
        # until Juju provides stable IPv6-support we unfortunately need this
        lxc network set lxdbr0 ipv6.address none
        sudo iptables -F FORWARD
        sudo iptables -P FORWARD ACCEPT
        # pull images
        lxc image copy --alias juju/bionic/amd64 --copy-aliases ubuntu-daily:bionic local:
        lxc image copy --alias juju/focal/amd64 --copy-aliases ubuntu-daily:focal local:
        lxc image copy --alias juju/jammy/amd64 --copy-aliases ubuntu-daily:jammy local:
        lxc image list
        juju bootstrap localhost
    - name: Functional test
      run: |
        set -euxo pipefail
        mkdir logs
        export PIP_CONSTRAINTS=$(pwd)/${{ matrix.pip_constraints }}
        export TEST_JUJU3=${{ matrix.juju3 }}
        tox -e func-target -- ${{ matrix.bundle }} | tee logs/tox-output.txt
    - name: crashdump on failure
      if: failure()
      run: |
        set -eux
        juju models
        model=$(juju models --format yaml|grep "^- name:.*zaza"|cut -f2 -d/)
        juju status -m $model | tee logs/juju-status.txt
        juju-crashdump -m $model -o logs/
    - name: upload logs on failure
      if: failure()
      uses: actions/upload-artifact@v2
      with:
        name: test-run-logs-and-crashdump
        path: logs/
    - name: consider debugging
      uses: lhotari/action-upterm@v1
      if: failure()


aim

name: aim

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'aim/**'
      - '.github/workflows/aim.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools wheel
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r aim/requirements.txt
    - name: Run examples
      run: |
        python aim/aim_integration.py
      env:
        OMP_NUM_THREADS: 1


allennlp

name: allennlp

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'allennlp/**'
      - '.github/workflows/allennlp.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r allennlp/requirements.txt
    - name: Run examples
      run: |
        python allennlp/allennlp_simple.py
        python allennlp/allennlp_jsonnet.py
      env:
        OMP_NUM_THREADS: 1


base

name: base

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - './**.py'
      - 'requirements.txt'
      - '.github/workflows/base.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r requirements.txt
    - name: Run examples
      run: |
        python max_trials_callback.py
        python enqueue_trial.py
        python quadratic_simple.py
        python simple_pruning.py
        python -m py_compile rapids_simple.py  # due to difficulty importing, compile only
        jupyter nbconvert --to notebook --execute quickstart.ipynb
      env:
        OMP_NUM_THREADS: 1


catboost

name: catboost

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'catboost/**'
      - '.github/workflows/catboost.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r catboost/requirements.txt
    - name: Run examples
      run: |
        python catboost/catboost_simple.py
        python catboost/catboost_pruning.py
      env:
        OMP_NUM_THREADS: 1


chainer

name: chainer

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'chainer/**'
      - '.github/workflows/chainer.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (apt)
      run: |
        sudo apt-get update
        sudo apt-get -y install openmpi-bin libopenmpi-dev
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r chainer/requirements.txt
    - name: Run examples
      run: |
        python chainer/chainer_simple.py
        python chainer/chainer_integration.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run multi-node examples
      run: |
        export OMPI_MCA_rmaps_base_oversubscribe=yes
        STORAGE_URL=sqlite:///example.db
        for file in `find chainer -name 'chainermn_*.py'`
        do
          echo $file
          STUDY_NAME=`optuna create-study --storage $STORAGE_URL`
          mpirun -n 2 -- python $file $STUDY_NAME $STORAGE_URL > /dev/null
        done
      env:
        OMP_NUM_THREADS: 1


Checks

name: Checks

on:
  push:
    branches:
      - main
  pull_request: {}
  schedule:
    - cron: '0 23 * * SUN-THU'

jobs:
  checks:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-python@v5
      with:
        python-version: 3.8

    - name: Install
      run: |
        python -m pip install -U pip
        pip install --progress-bar off -U black hacking isort

    - name: black
      run: black . --check --diff
    - name: flake8
      run: flake8 .
    - name: isort
      run: isort . --check --diff


dashboard

name: dashboard

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'dashboard/**'
      - '.github/workflows/dashboard.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
      - uses: actions/checkout@v4
      - name: setup-python${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install (Python)
        run: |
          python -m pip install --upgrade pip
          pip install --progress-bar off -U setuptools
          pip install git+https://github.com/optuna/optuna.git
          python -c 'import optuna'

          pip install -r dashboard/requirements.txt
          optuna-dashboard --version
      - name: Run examples
        run: |
          # Because Optuna Dashboard server forever until Ctrl-C is pressed,
          # here we only compile the script.
          python -m py_compile dashboard/run_server_simple.py
        env:
          OMP_NUM_THREADS: 1


dask

name: dask

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'dask/**'
      - '.github/workflows/dask.yml'

jobs:
  examples:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r dask/requirements.txt
    - name: Run examples
      run: |
        python dask/dask_simple.py
      env:
        OMP_NUM_THREADS: 1


name: dask_ml

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'dask_ml/**'
      - '.github/workflows/dask_ml.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r dask_ml/requirements.txt
    - name: Run examples
      run: |
        python dask_ml/dask_ml_simple.py
      env:
        OMP_NUM_THREADS: 1


fastai

name: fastai

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'fastai/**'
      - '.github/workflows/fastai.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r fastai/requirements.txt
    - name: Run examples
      run: |
        python fastai/fastai_simple.py
        python fastai/fastai_simple.py --pruning
      env:
        OMP_NUM_THREADS: 1


haiku

name: haiku

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'haiku/**'
      - '.github/workflows/haiku.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r haiku/requirements.txt
    - name: Run examples
      run: |
        python haiku/haiku_simple.py
      env:
        OMP_NUM_THREADS: 1


visualization with hiplot

name: visualization with hiplot

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'hiplot/**'
      - '.github/workflows/hiplot.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r hiplot/requirements.txt
    - name: Run examples
      run: |
        jupyter nbconvert --to notebook --execute hiplot/plot_study.ipynb
      env:
        OMP_NUM_THREADS: 1


hydra

name: hydra

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'hydra/**'
      - '.github/workflows/hydra.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r hydra/requirements.txt
    - name: Run Hydra examples
      run: |
        python hydra/simple.py --multirun > /dev/null
      env:
        OMP_NUM_THREADS: 1


keras

name: keras

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'keras/**'
      - '.github/workflows/keras.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r keras/requirements.txt
    - name: Run examples
      run: |
        python keras/keras_simple.py
        python keras/keras_integration.py
      env:
        OMP_NUM_THREADS: 1


lightgbm

name: lightgbm

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'lightgbm/**'
      - '.github/workflows/lightgbm.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r lightgbm/requirements.txt
    - name: Run LightGBM examples
      run: |
        python lightgbm/lightgbm_simple.py
        python lightgbm/lightgbm_integration.py
        python lightgbm/lightgbm_terminator.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run LightGBM Tuner examples
      run: |
        python lightgbm/lightgbm_tuner_simple.py
        python lightgbm/lightgbm_tuner_cv.py
      env:
        OMP_NUM_THREADS: 1


mlflow

name: mlflow

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'mlflow/**'
      - '.github/workflows/mlflow.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r mlflow/requirements.txt
    - name: Run examples
      run: |
        python mlflow/keras_mlflow.py
      env:
        OMP_NUM_THREADS: 1


name: multi_objective

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'multi_objective/**'
      - '.github/workflows/multi_objective.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r multi_objective/requirements.txt
    - name: Run examples
      run: |
        python multi_objective/botorch_simple.py
        python multi_objective/pytorch_simple.py
      env:
        OMP_NUM_THREADS: 1


pruners

name: pruners

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'pruners/**'
      - '.github/workflows/pruners.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r pruners/requirements.txt
    - name: Run examples
      run: |
        python pruners/wilcoxon_pruner_tsp_sa.py
      env:
        OMP_NUM_THREADS: 1


pytorch

name: pytorch

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'pytorch/**'
      - '.github/workflows/pytorch.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (apt)
      run: |
        sudo apt-get update
        sudo apt-get -y install openmpi-bin libopenmpi-dev
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r pytorch/requirements.txt
    - name: Run PyTorch examples
      run: |
        python pytorch/pytorch_simple.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run PyTorch checkpoint example
      run: |
        set +e
        timeout 20 python pytorch/pytorch_checkpoint.py > /dev/null
        set -e
        python pytorch/pytorch_checkpoint.py > /dev/null
      env:
        OMP_NUM_THREADS: 1
    - name: Run multi-node examples
      run: |
        export OMPI_MCA_rmaps_base_oversubscribe=yes
        STORAGE_URL=sqlite:///example.db
        mpirun -n 2 -- python pytorch/pytorch_distributed_simple.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run PyTorch spawn examples
      run: |
        python pytorch/pytorch_distributed_spawn.py --no-cuda
      env:
        OMP_NUM_THREADS: 1
    - name: Run PyTorch Ignite examples
      run: |
        python pytorch/pytorch_ignite_simple.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run PyTorch Lightning examples
      run: |
        python pytorch/pytorch_lightning_simple.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run PyTorch Lightning DDP examples
      run: |
        python pytorch/pytorch_lightning_ddp.py
        python pytorch/pytorch_lightning_ddp.py -p
      env:
        OMP_NUM_THREADS: 1


ray

name: ray

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'ray/**'
      - '.github/workflows/ray.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r ray/requirements.txt
    - name: Run examples
      run: |
        python ray/ray_joblib.py
      env:
        OMP_NUM_THREADS: 1


rl

name: rl

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'rl/**'
      - '.github/workflows/rl.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r rl/requirements.txt
    - name: Run examples
      run: |
        python rl/sb3_simple.py
      env:
        OMP_NUM_THREADS: 1


samplers

name: samplers

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'samplers/**'
      - '.github/workflows/samplers.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r samplers/requirements.txt
    - name: Run examples
      run: |
        python samplers/simulated_annealing_sampler.py
        python samplers/warm_starting_cma.py
      env:
        OMP_NUM_THREADS: 1


skimage

name: skimage

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'skimage/**'
      - '.github/workflows/skimage.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r skimage/requirements.txt
    - name: Run examples
      run: |
        python skimage/skimage_lbp_simple.py
      env:
        OMP_NUM_THREADS: 1


sklearn

name: sklearn

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'sklearn/**'
      - '.github/workflows/sklearn.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r sklearn/requirements.txt
    - name: Run examples
      run: |
        python sklearn/sklearn_additional_args.py
        python sklearn/sklearn_optuna_search_cv_simple.py
        python sklearn/sklearn_simple.py
      env:
        OMP_NUM_THREADS: 1


stale

name: stale

on:
  schedule:
    - cron: '0 23 * * SUN-THU'

jobs:
  stale:

    runs-on: ubuntu-latest

    if: github.repository == 'optuna/optuna-examples'
    steps:
    - uses: actions/stale@v6
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        stale-issue-message: 'This issue has not seen any recent activity.'
        stale-pr-message: 'This pull request has not seen any recent activity.'
        close-issue-message: 'This issue was closed automatically because it had not seen any recent activity. If you want to discuss it, you can reopen it freely.'
        close-pr-message: 'This pull request was closed automatically because it had not seen any recent activity. If you want to discuss it, you can reopen it freely.'
        days-before-issue-stale: 14
        days-before-issue-close: 100
        days-before-pr-stale: 7
        days-before-pr-close: 14
        stale-issue-label: 'stale'
        stale-pr-label: 'stale'
        exempt-issue-labels: 'no-stale'
        exempt-pr-labels: 'no-stale'
        operations-per-run: 1000


tensorboard

name: tensorboard

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'tensorboard/**'
      - '.github/workflows/tensorboard.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r tensorboard/requirements.txt
    - name: Run examples
      run: |
        python tensorboard/tensorboard_simple.py
      env:
        OMP_NUM_THREADS: 1


tensorflow

name: tensorflow

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'tensorflow/**'
      - '.github/workflows/tensorflow.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r tensorflow/requirements.txt
    - name: Run example of TensorFlow eager
      run: |
        python tensorflow/tensorflow_eager_simple.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run examples of TensorFlow estimator
      run: |
        if [ "${{ matrix.python-version }}" != "3.12" ] ; then
          pip install "tensorflow<2.16.0"
          python tensorflow/tensorflow_estimator_simple.py
          python tensorflow/tensorflow_estimator_integration.py
        fi
      env:
        OMP_NUM_THREADS: 1


terminator

name: terminator

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'terminator/**'
      - '.github/workflows/terminator.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r terminator/requirements.txt
    - name: Run examples
      run: |
        python terminator/terminator_improvement_plot.py
        python terminator/terminator_search_cv.py
        python terminator/terminator_simple.py
      env:
        OMP_NUM_THREADS: 1


tfkeras

name: tfkeras

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'tfkeras/**'
      - '.github/workflows/tfkeras.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r tfkeras/requirements.txt
    - name: Run examples
      run: |
        python tfkeras/tfkeras_simple.py
        python tfkeras/tfkeras_integration.py
      env:
        OMP_NUM_THREADS: 1


visualization

name: visualization

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'visualization/**'
      - '.github/workflows/visualization.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'

        pip install -r visualization/requirements.txt
    - name: Run examples
      run: |
        python visualization/plot_pareto_front.py
        python visualization/plot_study.py
      env:
        OMP_NUM_THREADS: 1


wandb

name: wandb

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'wandb/**'
      - '.github/workflows/wandb.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools wheel
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r wandb/requirements.txt
    - name: Run examples
      run: |
        wandb offline
        python wandb/wandb_integration.py
      env:
        OMP_NUM_THREADS: 1


xgboost

name: xgboost

on:
  schedule:
    - cron: '0 15 * * *'
  pull_request:
    paths:
      - 'xgboost/**'
      - '.github/workflows/xgboost.yml'

jobs:
  examples:
    if: (github.event_name == 'schedule' && github.repository == 'optuna/optuna-examples') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
    - uses: actions/checkout@v4
    - name: setup-python${{ matrix.python-version }}
      uses: actions/setup-python@v5
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install (Python)
      run: |
        python -m pip install --upgrade pip
        pip install --progress-bar off -U setuptools
        pip install git+https://github.com/optuna/optuna.git
        python -c 'import optuna'
        pip install git+https://github.com/optuna/optuna-integration.git
        python -c 'import optuna_integration'

        pip install -r xgboost/requirements.txt
    - name: Run XGBoost examples
      run: |
        python xgboost/xgboost_simple.py
        python xgboost/xgboost_integration.py
      env:
        OMP_NUM_THREADS: 1
    - name: Run XGBoost CV examples
      run: |
        python xgboost/xgboost_cv.py
        python xgboost/xgboost_cv_integration.py
      env:
        OMP_NUM_THREADS: 1


CodeQL

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: [ main, integration, development ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ main, integration, development ]
  schedule:
    - cron: '25 23 * * 1'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'python' ]
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
        # Learn more:
        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

    steps:
    - name: Checkout repository
      uses: actions/checkout@v3

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v2
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    - name: Autobuild
      uses: github/codeql-action/autobuild@v2

    # ℹ Command-line programs to run using the OS shell.
    # 📚 https://git.io/JvXDl

    # ✏ If the Autobuild fails above, remove it and uncomment the following three lines
    #    and modify them (or add more) to build your code if your project
    #    uses a compiled language

    #- run: |
    #   make bootstrap
    #   make release

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v2


develop-achi

name: develop-achi

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "ACHI_BRANCH=master"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:develop


develop-apple

name: develop-apple

on:
  push:
    branches:
      - 'develop'
jobs:
  docker:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "APPLE_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-apple:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-apple:develop


develop-ballcoin

name: develop-ballcoin

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v3
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "BALLCOIN_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ballcoin:develop


develop-base

name: develop-base

on: workflow_dispatch

jobs:
  docker-jammy:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile-jammy.base
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-jammy:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-jammy:develop

  docker-focal:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile-focal.base
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-focal:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-base-focal:develop


develop-btcgreen

name: develop-btcgreen

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "BTCGREEN_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-btcgreen:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-btcgreen:develop


develop-cactus

name: develop-cactus

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "CACTUS_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cactus:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cactus:develop


develop-chia

name: develop-chia

on:
  push:
    branches:
      - 'develop'

jobs:
  chia:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "CHIA_BRANCH=2.1.3"
            "BLADEBIT_BRANCH=master"
            "PLOTMAN_BRANCH=compress"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris:develop

  gigahorse:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "GIGAHORSE_BRANCH=v2.3.0.giga36"
            "CHIA_BRANCH=main"
            "PLOTMAN_BRANCH=compress"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gigahorse:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gigahorse:develop


develop-chinilla

name: develop-chinilla

on:
  push:
    branches:
      - 'develop'
jobs:
  docker:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "CHINILLA_BRANCH=release/1.4.0"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chinilla:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chinilla:develop


develop-chives

name: develop-chives

on:
  push:
    branches:
      - 'develop'

jobs:

  chives:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "CHIVES_REPO=https://github.com/HiveProject2021/chives-blockchain.git"
            "CHIVES_BRANCH=1.5.4"
            "PLOTMAN_BRANCH=development"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chives:develop

  chivesfoxy:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v3
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "CHIVES_REPO=https://github.com/foxypool/chives-blockchain.git"
            "CHIVES_BRANCH=main"
            "PLOTMAN_BRANCH=development"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-chivesfoxy:develop


develop-coffee

name: develop-coffee

on:
  push:
    branches:
      - 'develop'
jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "COFFEE_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-coffee:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-coffee:develop


develop-cryptodoge

name: develop-cryptodoge

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "CRYPTODOGE_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cryptodoge:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-cryptodoge:develop


develop-ecostake

name: develop-ecostake

on:
  push:
    branches:
      - 'develop'
jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "ECOSTAKE_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ecostake:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-ecostake:develop


develop-flax

name: develop-flax

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "FLAX_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flax:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flax:develop


develop-flora

name: develop-flora

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "FLORA_BRANCH=latest"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flora:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-flora:develop


develop-gold

name: develop-gold

on:
  push:
    branches:
      - 'develop'
jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "GOLD_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gold:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gold:develop


develop-greenbtc

name: develop-greenbtc

on:
  push:
    branches:
      - 'develop'
jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "GREENBTC_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-greenbtc:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-greenbtc:develop


develop-hddcoin

name: develop-hddcoin

on:
  push:
    branches:
      - 'develop'

jobs:
  docker:
    runs-on: ubuntu-20.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=focal"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "HDDCOIN_BRANCH=beta"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-hddcoin:develop


develop-littlelambocoin

name: develop-littlelambocoin

on:
  push:
    branches:
      - 'develop'
jobs:
  docker:
    runs-on: ubuntu-22.04
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build and push
        uses: docker/build-push-action@v4
        with:
          file: docker/dockerfile
          context: .
          platforms: linux/amd64
          provenance: false
          push: true
          build-args: |
            "UBUNTU_VER=jammy"
            "MACHINARIS_STREAM=develop"
            "CHIADOG_BRANCH=dev"
            "FDCLI_BRANCH=dev"
            "LITTLELAMBOCOIN_BRANCH=main"
          tags: |
            ${{ secrets.DOCKERHUB_USERNAME }}/machinaris-littlelambocoin:develop
            ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-littlelambocoin:develop