Skip to content

Build specification #3133

Build specification

Build specification #3133

Workflow file for this run

name: Build specification
on:
push:
paths-ignore:
- 'collection/resource/**'
- 'collection/log/**'
- 'index/**'
- 'var/**'
branches:
main
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
DLB_BOT_EMAIL: ${{ secrets.DLB_BOT_EMAIL }}
DLB_BOT_TOKEN: ${{ secrets.DLB_BOT_TOKEN }}
DLB_BOT_USERNAME: ${{ secrets.DLB_BOT_USERNAME }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}
- name: Setup git
run: |
git config user.email "${DLB_BOT_EMAIL}"
git config user.name "${DLB_BOT_USERNAME}"
git remote set-url origin https://${DLB_BOT_USERNAME}:${DLB_BOT_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git checkout ${GITHUB_REF##*/}
- name: Update makerules
run: make makerules
- name: Commit updated makerules
run: make commit-makerules
- name: Clean specification and docs
run: make clean clobber
- name: Install dependencies
run: make init
- name: Build specification
run: make specification
- name: Check specification
run: make check
- name: Commit specification
run: make commit-specification
- name: Build docs
run: make render
- name: Commit docs
run: make commit-docs
check-build-specification-failure:
runs-on: ubuntu-latest
needs:
- build
if: always() && needs.build.result == 'failure'
steps:
- name: send failure notification
uses: slackapi/slack-github-action@v1
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'planning-data-alerts'
payload: |
{
"text": "Build specification has failed",
"icon_emoji": ":rotating_light:",
"username": "Build specification",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Build specification has failed"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "The report is available on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub>"
}
}
]
}