@@ -63,22 +63,51 @@ jobs:
6363 uses : fermyon/actions/spin/setup@v1
6464
6565 # Push: WASM
66- - name : Push to OCI
67- id : push
68- uses : fermyon/actions/spin/push@v1
66+ # - name: Push to OCI
67+ # id: push
68+ # uses: fermyon/actions/spin/push@v1
69+ # with:
70+ # registry: ghcr.io
71+ # registry_username: ${{ github.actor }}
72+ # registry_password: ${{ secrets.GITHUB_TOKEN }}
73+ # registry_reference: "ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2"
74+ # manifest_file: spin.toml
75+
76+ # Push: Docker WASM (alternate while spin registry push cannot be used)
77+ - name : Set up QEMU
78+ uses : docker/setup-qemu-action@v3
79+ - name : setup buildx
80+ uses : docker/setup-buildx-action@v3
81+ - name : login to GitHub container registry
82+ uses : docker/login-action@v3
6983 with :
7084 registry : ghcr.io
71- registry_username : ${{ github.actor }}
72- registry_password : ${{ secrets.GITHUB_TOKEN }}
73- registry_reference : " ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2"
74- manifest_file : spin.toml
85+ username : ${{ github.actor }}
86+ password : ${{ secrets.GITHUB_TOKEN }}
7587
76- # Deploy:
77- - name : Deploy to Fermyon Cloud
78- uses : fermyon/actions/spin/deploy@v1
88+ - name : enable containerd image store
89+ run : |
90+ echo '{ "features": { "containerd-snapshotter": true } }' | sudo tee /etc/docker/daemon.json
91+ sudo systemctl restart docker
92+
93+ # Copied from https://github.com/spinkube/containerd-shim-spin/blob/main/.github/workflows/docker-build-push.yaml
94+ - name : build and push
95+ uses : docker/build-push-action@v5
7996 with :
80- fermyon_token : ${{ secrets.FERMYON_CLOUD_TOKEN }}
81- run_build : false
97+ push : true
98+ tags : |
99+ ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-3
100+ ghcr.io/kingdon-ci/flux-docs/build:latest
101+ context : .
102+ platforms : wasi/wasm
103+ provenance : false
104+
105+ # Deploy:
106+ # - name: Deploy to Fermyon Cloud
107+ # uses: fermyon/actions/spin/deploy@v1
108+ # with:
109+ # fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
110+ # run_build: false
82111
83112 - name : Set up Flux CLI
84113 uses :
fluxcd/flux2/[email protected] @@ -87,16 +116,23 @@ jobs:
87116 - name : Set Image (Kustomize SpinApp)
88117 run : |
89118 pushd deploy/spin-app
90- kustomize edit set image flux-docs/build=ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2
119+ kustomize edit set image flux-docs/build=ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-3
91120 popd
92121
93122 # Login: GHCR
94- - name : Login to GitHub Container Registry
95- uses : docker/login-action@v3
96- with :
97- registry : ghcr.io
98- username : ${{ github.actor }}
99- password : ${{ secrets.GITHUB_TOKEN }}
123+ # (Moved up to Docker build action while spin registry push is not viable for us)
124+ # - name: Login to GitHub Container Registry
125+ # uses: docker/login-action@v3
126+ # with:
127+ # registry: ghcr.io
128+ # username: ${{ github.actor }}
129+ # password: ${{ secrets.GITHUB_TOKEN }}
130+
131+ - name : Install cosign
132+ 133+
134+ - name : Cosign version
135+ run : cosign version
100136
101137 # Push: Kubernetes (Flux App)
102138 - name : Push manifests
@@ -108,12 +144,6 @@ jobs:
108144 --revision="${{ github.ref_name }}@sha1:${{ github.sha }}" \
109145 --annotations='org.opencontainers.image.description=Fluxcd.io website SpinKube manifests'
110146
111- - name : Install cosign
112- 113-
114- - name : Cosign version
115- run : cosign version
116-
117147 # Sign: Kubernetes manifests
118148 - name : Sign OCI YAML manifests
119149 run : |
@@ -124,4 +154,4 @@ jobs:
124154 - name : Sign OCI WASM artifact
125155 run : |
126156 # keyless mode
127- cosign sign ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-2 -y
157+ cosign sign ghcr.io/kingdon-ci/flux-docs/build:${{ github.run_id }}-3 -y
0 commit comments