🐳 Attempt 3 (fixed): Add Swagger docs generation step
This commit is contained in:
@@ -49,6 +49,22 @@ jobs:
|
|||||||
echo "Dependency hash: $DEPS_HASH"
|
echo "Dependency hash: $DEPS_HASH"
|
||||||
echo "deps_hash=$DEPS_HASH" >> $GITHUB_OUTPUT
|
echo "deps_hash=$DEPS_HASH" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Restore Swagger Docs Cache
|
||||||
|
id: cache-swagger-restore
|
||||||
|
uses: actions/cache/restore@v5
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
pkg/server/docs/docs.go
|
||||||
|
pkg/server/docs/swagger.json
|
||||||
|
pkg/server/docs/swagger.yaml
|
||||||
|
key: swagger-docs-${{ hashFiles('cmd/server/main.go', 'pkg/greet/*.go', 'pkg/server/*.go', 'go.mod') }}
|
||||||
|
restore-keys: |
|
||||||
|
swagger-docs-
|
||||||
|
|
||||||
|
- name: Generate Swagger Docs if needed
|
||||||
|
if: steps.cache-swagger-restore.outputs.cache-hit != 'true'
|
||||||
|
run: go generate ./pkg/server
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
run: |
|
run: |
|
||||||
source VERSION
|
source VERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user