Skip to content

Nightly JAX build

Nightly JAX build #186

name: Nightly JAX build
on:
schedule:
- cron: '30 9 * * *' # Pacific Time 01:30 AM in UTC
workflow_dispatch:
inputs:
PUBLISH:
type: boolean
description: Publish dated images and update the 'latest' tag?
default: false
required: false
permissions:
contents: read # to fetch code
actions: write # to cancel previous workflows
packages: write # to upload container
jobs:
metadata:
runs-on: ubuntu-22.04
outputs:
BUILD_DATE: ${{ steps.date.outputs.BUILD_DATE }}
steps:
- name: Set build date
id: date
shell: bash -x -e {0}
run: |
BUILD_DATE=$(TZ='US/Los_Angeles' date '+%Y-%m-%d')
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_OUTPUT
build:
needs: metadata
uses: ./.github/workflows/_build_jax.yaml
with:
BUILD_DATE: ${{ needs.metadata.outputs.BUILD_DATE }}
secrets: inherit
publish:
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.PUBLISH)
needs: [metadata, build]
uses: ./.github/workflows/_publish_container.yaml
secrets: inherit
with:
SOURCE_IMAGE: ${{ needs.build.outputs.DOCKER_TAGS }}
TARGET_IMAGE: jax
TARGET_TAGS: |
type=raw,value=latest,priority=1000
type=raw,value=nightly-${{ needs.metadata.outputs.BUILD_DATE }},priority=900