Skip to content

External Update artifact-a a17911809060001 #976

External Update artifact-a a17911809060001

External Update artifact-a a17911809060001 #976

# AUTO-GENERATED by cascade - DO NOT EDIT MANUALLY
# Regenerate with: cascade generate-workflow --config .github/manifest.yaml
name: External Update
run-name: External Update ${{ inputs.deploy_name }} ${{ inputs.sha }}
on:
workflow_dispatch:
inputs:
source_repo:
description: 'Source repository (e.g., org/cdk-infra)'
type: string
required: true
deploy_name:
description: 'Deploy name (e.g., cdk)'
type: string
required: true
environment:
description: 'Target environment'
type: string
required: true
sha:
description: 'Commit SHA from source repo'
type: string
required: true
version:
description: 'Version from source repo (optional)'
type: string
required: false
artifacts:
description: 'Artifacts JSON (optional)'
type: string
required: false
permissions:
contents: write
concurrency:
group: cascade-external-${{ inputs.deploy_name }}-${{ github.ref }}
cancel-in-progress: false
jobs:
update:
name: Update External State
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
token: ${{ secrets.CASCADE_STATE_TOKEN }}
- name: Setup CLI
uses: stablekernel/cascade/.github/actions/setup-cli@v1.1.2-rc.0
with:
token: ${{ secrets.CASCADE_STATE_TOKEN }}
version: v1.1.2-rc.0
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update External State
env:
SOURCE_REPO: ${{ inputs.source_repo }}
DEPLOY_NAME: ${{ inputs.deploy_name }}
ENVIRONMENT: ${{ inputs.environment }}
SHA: ${{ inputs.sha }}
VERSION: ${{ inputs.version }}
ARTIFACTS: ${{ inputs.artifacts }}
run: |
cascade external update \
--config .github/manifest.yaml \
--manifest-key ci \
--source-repo "$SOURCE_REPO" \
--deploy-name "$DEPLOY_NAME" \
--environment "$ENVIRONMENT" \
--sha "$SHA" \
--version "$VERSION" \
--artifacts "$ARTIFACTS"
deploy_artifact-a:
name: Deploy artifact-a
needs: update
if: ${{ needs.update.result == 'success' && inputs.deploy_name == 'artifact-a' }}
uses: ./.github/workflows/deploy-artifact-a.yaml
with:
environment: ${{ inputs.environment }}
sha: ${{ inputs.sha }}
version: ${{ inputs.version }}
deploy_name: ${{ inputs.deploy_name }}
secrets: inherit
deploy_artifact-b:
name: Deploy artifact-b
needs: update
if: ${{ needs.update.result == 'success' && inputs.deploy_name == 'artifact-b' }}
uses: ./.github/workflows/deploy-artifact-b.yaml
with:
environment: ${{ inputs.environment }}
sha: ${{ inputs.sha }}
version: ${{ inputs.version }}
deploy_name: ${{ inputs.deploy_name }}
secrets: inherit