-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 2.24 KB
/
Copy pathdeploy-config-render-drift.yml
File metadata and controls
71 lines (63 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Deploy Config Render Drift
on:
workflow_call:
inputs:
package-version:
description: Version of @jorisjonkers-dev/deploy-config-schema to install.
required: false
type: string
default: ^0.6.0
deploy-config-command:
description: Shell command that writes deploy-config JSON to DEPLOY_CONFIG_OUT.
required: true
type: string
targets:
description: Newline-separated adapter=relative/committed/path.yaml entries.
required: true
type: string
working-directory:
description: Directory where the deploy-config command runs and target paths are resolved.
required: false
type: string
default: .
node-auth-token:
description: Token with packages:read for installing @jorisjonkers-dev packages from GitHub Packages (pass secrets.GITHUB_TOKEN).
required: false
type: string
default: ""
permissions:
contents: read
packages: read
jobs:
render-drift:
name: Deploy Config Render Drift
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Resolve workflow ref
id: workflow-ref
shell: bash
env:
WORKFLOW_REF: ${{ github.workflow_ref }}
run: |
set -euo pipefail
ref="${WORKFLOW_REF#*@}"
if [ -z "$ref" ] || [ "$ref" = "$WORKFLOW_REF" ]; then
echo "::error::Unable to resolve reusable workflow ref from $WORKFLOW_REF"
exit 1
fi
printf 'ref=%s\n' "$ref" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v7
with:
repository: JorisJonkers-dev/github-workflows
ref: ${{ github.job_workflow_sha }}
path: .github-workflows
persist-credentials: false
- name: Check deploy config render drift
uses: ./.github-workflows/actions/deploy-config-render-drift
with:
package-version: ${{ inputs.package-version }}
deploy-config-command: ${{ inputs.deploy-config-command }}
targets: ${{ inputs.targets }}
working-directory: ${{ inputs.working-directory }}
node-auth-token: ${{ inputs.node-auth-token != '' && inputs.node-auth-token || github.token }}