Skip to content

use workflows v0.0.11 and deploy GitHub pages #1072

use workflows v0.0.11 and deploy GitHub pages

use workflows v0.0.11 and deploy GitHub pages #1072

Workflow file for this run

name: Main
on:
push:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.jpeg"
- "**.png"
- "index.html"
permissions:
contents: read
checks: write
pages: write
id-token: write
jobs:
golang_quality:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
golang_test:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
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]
with:
entrypoint: cmd/remindme/main.go
render_openapi_spec:
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/[email protected]

Check failure on line 43 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Main

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 43, Col: 11): Input artifact_name is required, but not provided while calling. .github/workflows/main.yml (Line: 43, Col: 11): Input artifact_path is required, but not provided while calling.
with:
spec_artifact_name: rendered-api-docu
spec_artifact_path: index.html
build_and_push_image:
needs: [golang_test, golang_quality, render_openapi_spec]
runs-on: ubuntu-latest
if: "!startsWith(github.ref, 'refs/tags/')"
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Build container
run: docker build --build-arg VERSION=${{ github.sha }} -t cubicrootxyz/remindme:beta .
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push development image
if: "${{ github.ref != 'refs/heads/main' }}"
run: |
docker tag cubicrootxyz/remindme:beta cubicrootxyz/remindme:${{ github.sha }}
docker push cubicrootxyz/remindme:${{ github.sha }}
- name: Push beta image
if: "${{ github.ref == 'refs/heads/main' }}"
run: docker push cubicrootxyz/remindme:beta