@@ -63,22 +63,51 @@ jobs:
63
63
uses : fermyon/actions/spin/setup@v1
64
64
65
65
# 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
69
83
with :
70
84
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 }}
75
87
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
79
96
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
82
111
83
112
- name : Set up Flux CLI
84
113
uses :
fluxcd/flux2/[email protected]
@@ -87,16 +116,23 @@ jobs:
87
116
- name : Set Image (Kustomize SpinApp)
88
117
run : |
89
118
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
91
120
popd
92
121
93
122
# 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
100
136
101
137
# Push: Kubernetes (Flux App)
102
138
- name : Push manifests
@@ -108,12 +144,6 @@ jobs:
108
144
--revision="${{ github.ref_name }}@sha1:${{ github.sha }}" \
109
145
--annotations='org.opencontainers.image.description=Fluxcd.io website SpinKube manifests'
110
146
111
- - name : Install cosign
112
-
113
-
114
- - name : Cosign version
115
- run : cosign version
116
-
117
147
# Sign: Kubernetes manifests
118
148
- name : Sign OCI YAML manifests
119
149
run : |
@@ -124,4 +154,4 @@ jobs:
124
154
- name : Sign OCI WASM artifact
125
155
run : |
126
156
# 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