Skip to content

chore(deps): update module maunium.net/go/mautrix to v0.21.0 #1049

chore(deps): update module maunium.net/go/mautrix to v0.21.0

chore(deps): update module maunium.net/go/mautrix to v0.21.0 #1049

Workflow file for this run

name: Main
on:
push:
paths-ignore:
- "**.md"
- "**.jpg"
- "**.jpeg"
- "**.png"
- "index.html"
permissions:
# Required by golangci job to write annotations to the merge request.
contents: read
checks: write
jobs:
golang_quality:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
golang_test:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
needs: [build_documentation] # 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_documentation:
runs-on: ubuntu-latest
if: "!startsWith(github.ref, 'refs/tags/')"
container:
image: cubicrootxyz/golang-ci:v1.23.0
options: --user root
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v3
with:
node-version: "14"
- name: Get dependencies
run: go get ./...
- name: Build the api documentation
run: swag init --parseDependency=true -d . -g cmd/remindme/main.go
- name: Convert to OpenApi 3
run: openapi-code-sample-generator convert --file docs/swagger.yaml --output-file docs/swagger3.yaml
- name: Add code samples to api documentation
run: openapi-code-sample-generator generate --input-file docs/swagger3.yaml --output-file docs/api-spec.yaml
- name: Build static html
run: npx redoc-cli bundle docs/api-spec.yaml --output index.html
- name: Archive rendered HTML
uses: actions/upload-artifact@v4
with:
name: rendered-api-docu
path: |
index.html
# publish_documentation:
# runs-on: ubuntu-latest
# if: "${{ github.ref == 'refs/heads/main' }}"
# needs:
# - build_documentation
# # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
# permissions:
# pages: write
# id-token: write
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# steps:
# - name: Deploy to GitHub Pages
# if: "${{ github.ref == 'refs/heads/main' }}"
# id: deployment
# uses: actions/deploy-pages@v4
# with:
# artifact_name: rendered-api-docu
build_and_push_image:
needs: [golang_test, golang_quality, build_documentation]
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