Skip to content

feat(.github): use non-branch specific cache with deploy #10

feat(.github): use non-branch specific cache with deploy

feat(.github): use non-branch specific cache with deploy #10

Workflow file for this run

name: Deploy
on:
workflow_call:
inputs:
stacks:
type: string
default: "**"
environment:
type: string
action:
type: string
workflow_dispatch:
inputs:
environment:
type: environment
description: Target environment
action:
type: choice
options:
- deploy
- diff
description: Action to perform
stacks:
type: string
description: Stacks to deploy
default: "**"
concurrency: deploy-${{ github.ref_name }}-${{ inputs.environment }}
env:
TAG: ${{ github.sha }}
jobs:
setup_mise_tools:
uses: ./github/workflows/mise.yml

Check failure on line 36 in .github/workflows/_deploy-env.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/_deploy-env.yml

Invalid workflow file

invalid value workflow reference: no version specified
run:
name: ${{ inputs.action }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment:
name: ${{ inputs.environment }}
url: ${{ vars.environment_url }}
steps:
- uses: actions/checkout@v4
- name: Log in to ${{ inputs.environment }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-1
role-to-assume: arn:aws:iam::${{ vars.account_id }}:role/kitu-github-actions-role
- name: Install dependencies
run: npm ci
working-directory: infra
- name: ${{ inputs.action }}
working-directory: infra
run: |
aws logs start-live-tail --log-group-identifiers arn:aws:logs:eu-west-1:${{ vars.account_id }}:log-group:KituService &
npx cdk ${{ inputs.action }} --require-approval=never --exclusively '${{ inputs.environment }}/${{ inputs.stacks }}'