generated from int128/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (91 loc) · 3.71 KB
/
ts.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: ts
on:
pull_request:
paths:
- src/**
- tests/**
- '*.json'
- '*.yaml'
- .github/workflows/ts.yaml
push:
branches:
- main
paths:
- src/**
- tests/**
- '*.json'
- '*.yaml'
- .github/workflows/ts.yaml
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm test
- run: pnpm build
- id: kustomize-single
uses: ./
with:
kustomization: tests/fixtures/overlays/*/kustomization.yaml
- run: find ${{ steps.kustomize-single.outputs.directory }}
- run: |
cat <<EOF
${{ steps.kustomize-single.outputs.files }}
EOF
- run: test -f ${{ steps.kustomize-single.outputs.directory }}/tests/fixtures/overlays/development/generated.yaml
- run: test -f ${{ steps.kustomize-single.outputs.directory }}/tests/fixtures/overlays/production/generated.yaml
- id: kustomize-individual
uses: ./
with:
kustomization: tests/fixtures/overlays/*/kustomization.yaml
write-individual-files: true
- run: find ${{ steps.kustomize-individual.outputs.directory }}
- run: |
cat <<EOF
${{ steps.kustomize-individual.outputs.files }}
EOF
- run: test -f ${{ steps.kustomize-individual.outputs.directory }}/tests/fixtures/overlays/development/v1_service_echoserver.yaml
- run: test -f ${{ steps.kustomize-individual.outputs.directory }}/tests/fixtures/overlays/development/apps_v1_deployment_echoserver.yaml
- run: test -f ${{ steps.kustomize-individual.outputs.directory }}/tests/fixtures/overlays/production/v1_service_echoserver.yaml
- run: test -f ${{ steps.kustomize-individual.outputs.directory }}/tests/fixtures/overlays/production/apps_v1_deployment_echoserver.yaml
- id: kustomize-single-with-extra-files
uses: ./
with:
kustomization: tests/fixtures/overlays/*/kustomization.yaml
extra-files: tests/fixtures/overlays/*/metadata.yaml
- run: find ${{ steps.kustomize-single-with-extra-files.outputs.directory }}
- run: |
cat <<EOF
${{ steps.kustomize-single-with-extra-files.outputs.files }}
EOF
- run: test -f ${{ steps.kustomize-single-with-extra-files.outputs.directory }}/tests/fixtures/overlays/development/generated.yaml
- run: test -f ${{ steps.kustomize-single-with-extra-files.outputs.directory }}/tests/fixtures/overlays/development/metadata.yaml
- run: test -f ${{ steps.kustomize-single-with-extra-files.outputs.directory }}/tests/fixtures/overlays/production/generated.yaml
- run: test ! -f ${{ steps.kustomize-single-with-extra-files.outputs.directory }}/tests/fixtures/overlays/production/metadata.yaml
- id: kustomize-error
uses: ./
with:
kustomization: tests/fixtures/invalid/kustomization.yaml
ignore-kustomize-error: true
generate:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm lint --fix
- run: pnpm format
- uses: int128/update-generated-files-action@0c31bff4a68c9a6f4ac83dd528bf45f77620f191 # v2.50.0