pez-infra/.github/workflows/deploy.yml
dependabot[bot] 352bfbe3bc
chore(deps): bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/cache](https://github.com/actions/cache).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

Updates `actions/cache` from 5 to 6
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-24 16:04:43 +00:00

54 lines
1.4 KiB
YAML

name: Deploy (manual)
on:
workflow_dispatch:
inputs:
target:
description: "Target host (e.g. helsinki-a, london-b, all)"
required: true
type: string
playbook:
description: "Ansible playbook to run (e.g. site.yml, update.yml)"
required: true
type: string
dry_run:
description: "Dry run (--check mode)"
required: false
type: boolean
default: true
jobs:
prepare:
name: Prepare matrix
runs-on: ubuntu-latest
outputs:
hosts: ${{ steps.prepare.outputs.hosts }}
steps:
- uses: actions/checkout@v7
- name: Build host matrix
id: prepare
run: |
ALL_HOSTS=$(grep 'ansible_host=' ansible/inventory/hosts.ini | awk '{print $1}' | jq -R . | jq -cs .)
TARGET="${{ inputs.target }}"
if [ "$TARGET" = "all" ]; then
echo "hosts=$ALL_HOSTS" >> "$GITHUB_OUTPUT"
else
JSON=$(echo "$TARGET" | tr ',' '\n' | tr -d ' ' | grep -v '^$' | jq -R . | jq -cs .)
echo "hosts=$JSON" >> "$GITHUB_OUTPUT"
fi
deploy:
needs: prepare
strategy:
matrix:
host: ${{ fromJson(needs.prepare.outputs.hosts) }}
fail-fast: false
permissions:
id-token: write
uses: ./.github/workflows/_deploy-core.yml
with:
host: ${{ matrix.host }}
playbook: ${{ inputs.playbook }}
dry_run: ${{ inputs.dry_run }}
secrets: inherit