Skip to content

Nightly

Nightly #745

Workflow file for this run

name: Nightly
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: 0 6 * * *
# Enable running this workflow manually from the Actions tab
workflow_dispatch:
env:
CI: 'true'
jobs:
#
# Determine which workspaces have changed and re-version them
#
update-versions:
runs-on: ubuntu-latest
outputs:
changed_workspaces: ${{ steps.version.outputs.changed_workspaces }}
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: ${{ secrets.NIGHTLY_BUILD_DEPLOY_KEY }}
token: ${{ secrets.CARBON_BOT_TOKEN }}
- name: Set up Git user 🤖
run: |
git config --global user.email '[email protected]'
git config --global user.name 'Carbon Bot'
- name: Setup Node 🏗
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
# A full install is done here since micromanage does an install internally to keep the
# lockfile up to date.
- name: Install Node Modules 🔧
run: npm install
- id: version
name: Version 📆
run: echo "changed_workspaces=$(npx micromanage changed | xargs npx micromanage version --json)" >> $GITHUB_OUTPUT
#
# Build docker images for all changed services and push them to the container registry
#
services:
needs: update-versions
uses: ./.github/workflows/publish-service.yml
with:
service_name: ${{ matrix.service }}
service_tag: ${{ fromJSON(needs.update-versions.outputs.changed_workspaces)[matrix.service] }}
strategy:
fail-fast: false
matrix:
service:
- '@carbon-platform/data-graph'
- '@carbon-platform/logging'
- '@carbon-platform/web-app'
secrets:
CONTAINER_REGISTRY_API_KEY: ${{ secrets.CONTAINER_REGISTRY_API_KEY }}
#
# Build all changed packages and publish them to npmjs
#
packages:
needs: update-versions
uses: ./.github/workflows/publish-package.yml
with:
package_name: ${{ matrix.package }}
package_tag: ${{ fromJSON(needs.update-versions.outputs.changed_workspaces)[matrix.package] }}
strategy:
fail-fast: false
matrix:
package:
- '@carbon-platform/mdx-sanitizer'
- '@carbon-platform/resources'
- '@carbon-platform/rmdx'
- '@carbon-platform/schemas'
- 'micromanage-cli'
secrets:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}