Skip to content

force-build

force-build #18

Workflow file for this run

# this workflow is a workaround for docs-test job of ci-cd workflow failures
# as github rate limits the number of HTTP requests
# use only when you need to build the binaries/artifacts first making sure that other tests pass
name: force-build
on:
workflow_dispatch:
# make sure those env vars are aligned with the ones in ci-cd.yml workflow
env:
GO_VER: "1.20.2"
CGO_ENABLED: 0
MKDOCS_INS_VER: 9.5.9-insiders-4.52.2-hellt
GORELEASER_VER: v1.11.4
PY_VER: "3.10"
jobs:
get-tag:
runs-on: ubuntu-22.04
outputs:
git_tag: ${{ steps.git_tag.outputs.git_tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get git tag
id: git_tag
run: |
echo "::set-output name=git_tag::$(git tag --points-at)"
echo ${{ steps.git_tag.outputs.git_tag }}
build-and-release:
needs: get-tag
if: ${{ needs.get-tag.outputs.git_tag != '' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVER }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: ${{ env.GORELEASER_VER }}
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }}
publish-docs:
needs: build-and-release
runs-on: ubuntu-22.04
if: contains(github.ref, '-') != true # do not publish docs for beta releases which will have something like v0.0.0-0.33.0-beta
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build docs
if: ${{ contains(needs.get-tag.outputs.git_tag, '-') != true }}
run: docker run -v $(pwd):/docs --entrypoint mkdocs ghcr.io/srl-labs/mkdocs-material-insiders:$MKDOCS_INS_VER gh-deploy --force --strict