2024-10-13 13:52:56 +00:00
|
|
|
# Based on https://github.com/riscv/riscv-isa-manual/blob/main/.github/workflows/isa-build.yml
|
|
|
|
name: Central(Architecture) Docs Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-11-02 09:40:34 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 'devops/**'
|
2024-10-13 13:52:56 +00:00
|
|
|
pull_request:
|
2024-11-02 09:40:34 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 'devops/**'
|
2024-10-13 13:52:56 +00:00
|
|
|
types: [opened, synchronize]
|
|
|
|
|
|
|
|
env:
|
|
|
|
DOCKER_IMG: docker-asciidoctor-wavedrom
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build Documentation
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Set short SHA
|
|
|
|
run: echo "SHORT_SHA=$(echo ${GITEA_SHA::7})" >> $GITEA_ENV
|
|
|
|
|
|
|
|
- name: Get current date
|
|
|
|
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITEA_ENV
|
|
|
|
|
|
|
|
- name: Login to Gitea Container Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: ${{ vars.CONTAINER_REGISTRY_URL }}
|
|
|
|
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
|
|
|
|
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
|
|
|
|
|
|
|
- name: Pull Container
|
|
|
|
id: pull_container_image
|
|
|
|
run: docker pull ${{ vars.CONTAINER_REGISTRY_URL }}/${{ gitea.repository_owner }}/${{ env.DOCKER_IMG }}:latest
|
|
|
|
|
|
|
|
- name: Build Files
|
|
|
|
id: build_files
|
|
|
|
if: steps.pull_container_image.outcome == 'success'
|
2024-10-13 16:36:56 +00:00
|
|
|
run: make
|
2024-10-13 13:52:56 +00:00
|
|
|
|
|
|
|
- name: Upload central-execution-engine-spec.pdf
|
|
|
|
if: steps.build_files.outcome == 'success'
|
2024-10-13 16:45:21 +00:00
|
|
|
uses: christopherhx/gitea-upload-artifact@v4
|
2024-10-13 13:52:56 +00:00
|
|
|
with:
|
|
|
|
name: central-execution-engine-spec-${{ env.SHORT_SHA }}.pdf
|
|
|
|
path: ${{ gitea.workspace }}/build/central-execution-engine-spec.pdf
|
|
|
|
retention-days: 7
|