feat: initial release #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync chart CRDs | |
| # The Helm chart lives in devops-ia/helm-dwpk, but its CRDs and the manager | |
| # ClusterRole are generated here by controller-gen. Nothing in the chart repo | |
| # can notice when api/v1alpha1 changes, so this pushes the regenerated files | |
| # there as a pull request instead of waiting for someone to remember. | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "api/v1alpha1/**" | |
| - "config/crd/bases/**" | |
| - "config/rbac/role.yaml" | |
| - "hack/sync-chart-crds.sh" | |
| permissions: {} | |
| jobs: | |
| sync: | |
| name: Regenerate and open a chart PR | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout dwpk | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| path: dwpk | |
| persist-credentials: false | |
| - name: Checkout helm-dwpk | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: devops-ia/helm-dwpk | |
| path: helm-dwpk | |
| token: ${{ secrets.PAT_GITHUB }} | |
| persist-credentials: true | |
| - name: Setup Go | |
| uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version-file: dwpk/go.mod | |
| - name: Regenerate the CRDs into the chart | |
| working-directory: dwpk | |
| run: make sync-chart-crds HELM_CHART_DIR=../helm-dwpk/charts/dwpk | |
| # The chart ships example CRs that rot the same way the CRDs do: a field | |
| # removed from a type leaves a YAML that kubectl refuses outright. This | |
| # is the only place both repositories are checked out together, so it is | |
| # the only place that check can run. | |
| - name: Check the chart's example CRs still decode | |
| working-directory: dwpk | |
| env: | |
| DWPK_CHART_EXAMPLES: ../../../helm-dwpk/charts/dwpk/examples/crs | |
| run: go test ./api/v1alpha1/ -run TestShippedManifestsMatchTheCurrentSchema -count=1 | |
| - name: Open a pull request on helm-dwpk | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| path: helm-dwpk | |
| token: ${{ secrets.PAT_GITHUB }} | |
| branch: fix/sync-crds | |
| delete-branch: true | |
| commit-message: "fix: sync CRDs from dwpk@${{ github.sha }}" | |
| title: "fix: sync CRDs from dwpk" | |
| labels: auto-pr-bump-version | |
| body: | | |
| Regenerated by `make sync-chart-crds` in | |
| [devops-ia/dwpk@${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}). | |
| Covers `templates/crd/*` and `templates/rbac/manager-role.yaml`, both | |
| of which are generated from `api/v1alpha1` and the `+kubebuilder:rbac` | |
| markers. Edit those upstream, never here. |