|
27 | 27 | ref: test-stimulus
|
28 | 28 | path: website
|
29 | 29 |
|
| 30 | + # Prerequisites: |
30 | 31 | - name: Setup Hugo
|
31 | 32 | uses: peaceiris/actions-hugo@v3
|
32 | 33 | with:
|
|
43 | 44 | with:
|
44 | 45 | go-version: '^1.21.0'
|
45 | 46 |
|
| 47 | + # Build: |
46 | 48 | - name: Build content
|
47 | 49 | env:
|
48 | 50 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
56 | 58 | - name: Install Spin
|
57 | 59 | uses: fermyon/actions/spin/setup@v1
|
58 | 60 |
|
| 61 | + # Push: WASM |
59 | 62 | - name: Push to OCI
|
60 | 63 | id: push
|
61 | 64 | uses: fermyon/actions/spin/push@v1
|
|
66 | 69 | registry_reference: "ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2"
|
67 | 70 | manifest_file: spin.toml
|
68 | 71 |
|
| 72 | + # Deploy: |
69 | 73 | - name: Deploy to Fermyon Cloud
|
70 | 74 | uses: fermyon/actions/spin/deploy@v1
|
71 | 75 | with:
|
72 | 76 | fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
|
73 | 77 | run_build: false
|
| 78 | + |
| 79 | + - name: Set up Flux CLI |
| 80 | + uses: fluxcd/flux2/[email protected] |
| 81 | + |
| 82 | + # Update: Kubernetes manifests |
| 83 | + - name: Set Image (Kustomize SpinApp) |
| 84 | + run: | |
| 85 | + pushd deploy/spin-app |
| 86 | + kustomize edit set image flux-docs/build=ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2 |
| 87 | + popd |
| 88 | +
|
| 89 | + # Push: Kubernetes (Flux App) |
| 90 | + - name: Push manifests |
| 91 | + run: | |
| 92 | + flux push artifact \ |
| 93 | + oci://ghcr.io/kingdon-ci/flux-docs/manifests:latest \ |
| 94 | + --path=deploy \ |
| 95 | + --source=${{ github.repositoryUrl }} \ |
| 96 | + --revision="${{ github.ref_name }}@sha1:${{ github.sha }}" \ |
| 97 | + --annotations='org.opencontainers.image.description=Fluxcd.io website SpinKube manifests' |
| 98 | +
|
| 99 | + - name: Install cosign |
| 100 | + |
| 101 | + |
| 102 | + - name: Cosign version |
| 103 | + run: cosign version |
| 104 | + |
| 105 | + # Sign: Kubernetes manifests |
| 106 | + - name: Sign OCI YAML manifests |
| 107 | + run: | |
| 108 | + # keyless mode |
| 109 | + cosign sign ghcr.io/kingdon-ci/flux-docs/manifests:latest -y |
| 110 | +
|
| 111 | + # Sign: Spin app OCI artifact |
| 112 | + - name: Sign OCI WASM artifact |
| 113 | + run: | |
| 114 | + # keyless mode |
| 115 | + cosign sign ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2 -y |
0 commit comments