Skip to content

fixed docs and improved doc generation for GH Wiki #30

fixed docs and improved doc generation for GH Wiki

fixed docs and improved doc generation for GH Wiki #30

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
push: true
build-args: |
VERSION=${{ env.RELEASE_VERSION }}
GITHUB_REPOSITORY=${{ github.repository }}
tags: |
ghcr.io/iits-consulting/otc-auth:latest
ghcr.io/iits-consulting/otc-auth:${{ env.RELEASE_VERSION }}
aur-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Prepare PKGBUILD
run: |
# We simply imply that ref is always a valid tag for now.
sed -e "s/__VERSION__/${GITHUB_REF_NAME}/" <PKGBUILD.template >PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: otc-auth
pkgbuild: ./PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Bump to ${{ github.github_ref_name }}"
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
wikiupdate:
runs-on: ubuntu-latest
steps:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ^1.20
- name: Checkout
uses: actions/checkout@v2
- name: Get dependencies
run: go mod download
- name: Build
run: go run main.go documentation
- name: Checkout wiki code
uses: actions/checkout@v2
with:
repository: ${{github.repository}}.wiki
path: markdown
- name: Push to wiki
run: |
cp -r generated-documentation.md markdown/
cd markdown
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "Updated docs" && git push