Aspect Workflows Delivery #218
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Aspect Workflows Delivery | |
on: | |
# Allow this to be triggered manually via the GH UI. See | |
# https://docs.aspect.build/workflows/delivery#break-glass-deliver-on-red | |
workflow_dispatch: | |
inputs: | |
delivery_commit: | |
description: The commit to checkout and run the delivery from. Targets listed in the delivery manifest for this commit will be delivered unless specific targets are listed in `delivery_targets`. | |
type: string | |
required: true | |
workspace: | |
description: The workspace to deliver from | |
type: string | |
required: false | |
default: '.' | |
delivery_targets: | |
description: List of Bazel targets to deliver, delimited by spaces. For example, \`//app/a:push_release //app/b:push_release\`. If empty, targets listed in the delivery manifest for the target commit will be delivered. | |
type: string | |
required: false | |
jobs: | |
delivery: | |
name: Aspect Workflows Delivery | |
runs-on: [self-hosted, aspect-workflows, aspect-default] | |
env: | |
ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin | |
steps: | |
- name: Workflows environment | |
run: ${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.delivery_commit }} | |
# Fetch all history for all tags and branches, so the --workspace_status_command can find | |
# any tags that it needs for `git describe`. | |
# See https://github.com/actions/checkout#Fetch-all-history-for-all-tags-and-branches | |
fetch-depth: 0 | |
- name: Agent health check | |
# Set RUNNER_TRACKER_ID="" to prevent GitHub Actions from killing the Bazel server started | |
# during health check when "Cleaning up orphan processes" in the "Complete job" step. | |
# See https://github.com/actions/runner/issues/598. | |
run: RUNNER_TRACKER_ID="" && ${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check | |
- name: Run delivery | |
uses: aspect-build/workflows-action@5.11.17 | |
with: | |
task: delivery | |
workspace: ${{ inputs.workspace }} | |
env: | |
DELIVERY_COMMIT: ${{ inputs.delivery_commit }} | |
DELIVERY_TARGETS: ${{ inputs.delivery_targets }} |