-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use workflows v0.0.11 and deploy GitHub pages
- Loading branch information
1 parent
84cc4b7
commit b606236
Showing
1 changed file
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,42 +9,41 @@ on: | |
- "index.html" | ||
|
||
permissions: | ||
# Required by golangci job to write annotations to the merge request. | ||
contents: read | ||
checks: write | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
golang_quality: | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].8 | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].11 | ||
|
||
golang_test: | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].8 | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].11 | ||
needs: [build_openapi_spec] # Validates agains OpenAPI spec | ||
with: | ||
services: '{"database": {"image": "mysql:9.0", "ports": ["3306:3306"], "env": {"MYSQL_ROOT_PASSWORD": "mypass", "MYSQL_DATABASE": "remindme"}}}' | ||
env: '{"TEST_DB_HOST": "database"}' | ||
|
||
build_openapi_spec: | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].10 | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected].11 | ||
with: | ||
entrypoint: cmd/remindme/main.go | ||
|
||
render_openapi_spec: | ||
needs: | ||
- build_openapi_spec | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected] | ||
needs: [build_openapi_spec] | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected] | ||
with: | ||
spec_artifact_name: openapi-spec | ||
spec_artifact_path: docs/ | ||
spec_filename: swagger.yaml | ||
|
||
#deploy_openapi_spec: | ||
# needs: | ||
# - render_openapi_spec | ||
# uses: CubicrootXYZ/Workflows/.github/workflows/pages.yaml@59264c0b6ab33bd845849f9b00e1e9057c8518d5 | ||
# with: | ||
# spec_artifact_name: rendered-api-docu | ||
# spec_artifact_path: ./ | ||
deploy_openapi_spec: | ||
needs: [render_openapi_spec] | ||
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected] | ||
with: | ||
spec_artifact_name: rendered-api-docu | ||
spec_artifact_path: index.html | ||
|
||
build_and_push_image: | ||
needs: [golang_test, golang_quality, render_openapi_spec] | ||
|