Skip to content

Commit

Permalink
Add GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
j616 committed Nov 14, 2023
1 parent 172a639 commit 4bcdb4c
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI Workflow
run-name: ${{ format('{0} triggered by {1} on {2} {3}', github.workflow, (github.event_name == 'workflow_dispatch' && format('user {0}', github.actor) || format('{0} event', github.event_name) ), github.repository, github.ref_name) }}
on:
schedule:
- cron: '0 4 * * 1-5'

# Pull requests and pushes will not trigger a run if the only changes are on workflows other than this one
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/ci-workflow.yml'

push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/ci-workflow.yml'
branches:
- 'main'

workflow_dispatch:
# NOTE: Defaults here are only for the dispatch run dialogue box. See the shared workflow calls below for defaults for runs triggered by other means
inputs:
forceDocsUpload:
description: 'Force docs upload'
required: false
type: boolean
pythonVersion:
description: 'Python version to use'
required: true
default: '3.10'
type: string
commontoolingBranch:
description: 'Commontooling branch or tag to use'
required: true
default: 'main'
type: string

jobs:
SharedCIWorkflow:
name: Shared Workflow
permissions:
actions: read
contents: read
pages: write
id-token: write
uses: ./.github/workflows/shared-ext-ci-workflow.yml
with:
# workflow_dispatch inputs are always strings. Convert to boolean.
forceDocsUpload: ${{ inputs.forceDocsUpload == true }}
pythonVersion: ${{ inputs.pythonVersion || '3.10' }}
commontoolingBranch: ${{ inputs.commontoolingBranch || 'main' }}
enableArtifactoryPip: true
secrets: inherit
42 changes: 42 additions & 0 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release Workflow
run-name: ${{ format('{0} triggered by {1} on {2} {3}', github.workflow, (github.event_name == 'workflow_dispatch' && format('user {0}', github.actor) || format('{0} event', github.event_name) ), github.repository, github.ref_name) }}
on:
workflow_dispatch:
# Defaults here are only for the dispatch run dialogue box. See the shared workflow calls below for defaults for runs triggered by other means
inputs:
commontoolingBranch:
description: 'Commontooling branch or tag to use'
required: true
default: 'main'
type: string
pythonVersion:
description: 'Python version to use'
required: true
default: '3.10'
type: string

jobs:
SharedReleaseWorkflow:
name: Release
permissions:
contents: write
uses: ./.github/workflows/shared-ext-release-workflow.yml
with:
commontoolingBranch: ${{ inputs.commontoolingBranch || 'main' }}
secrets: inherit

SharedCIWorkflow:
name: CI
permissions:
actions: read
contents: read
pages: write
id-token: write
needs: SharedReleaseWorkflow
uses: ./.github/workflows/shared-ext-ci-workflow.yml
with:
commontoolingBranch: ${{ inputs.commontoolingBranch || 'main' }}
pythonVersion: ${{ inputs.pythonVersion || '3.10' }}
enableArtifactoryPip: true
checkoutRef: ${{ needs.SharedReleaseWorkflow.outputs.releaseRef }}
secrets: inherit

0 comments on commit 4bcdb4c

Please sign in to comment.