mirror of
https://github.com/pezkuwichain/labels.git
synced 2026-04-22 07:47:59 +00:00
Initial labels setup for Pezkuwi SDK
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
name: Check Label Documentation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
# Default to bash
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
MDBOOK_VERSION: 0.4.37 # https://github.com/rust-lang/mdBook/releases
|
||||
TERA_VERSION: 0.2.4 # https://github.com/chevdor/tera-cli/release
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Tools
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/mdbook.tar.gz https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz && \
|
||||
tar xf ${{ runner.temp }}/mdbook.tar.gz && mv mdbook /usr/local/bin && \
|
||||
wget -O ${{ runner.temp }}/tera.deb https://github.com/chevdor/tera-cli/releases/download/v${TERA_VERSION}/tera-cli_linux_amd64.deb && \
|
||||
sudo dpkg -i ${{ runner.temp }}/tera.deb
|
||||
|
||||
- name: Generate the doc
|
||||
run: ./scripts/build-doc.sh
|
||||
|
||||
- name: Check
|
||||
run: ls -al ./docs/src
|
||||
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
|
||||
|
||||
- name: Render book
|
||||
run: ./scripts/generate_book.sh
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
|
||||
with:
|
||||
path: ./docs/book
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Check label Rules
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE: paritytech/ruled_labels:0.4.0
|
||||
|
||||
jobs:
|
||||
check-label-rules:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
repo: [polkadot-sdk]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
- name: Pull image
|
||||
run: docker pull $IMAGE
|
||||
|
||||
- name: Check label Rules for ${{ matrix.repo }}
|
||||
env:
|
||||
MOUNT: /work
|
||||
RULES_PATH: ruled_labels
|
||||
run: |
|
||||
docker run --rm -i -v $PWD/${RULES_PATH}/:$MOUNT $IMAGE test -s ${MOUNT}/specs_${{ matrix.repo }}.yaml ${MOUNT}/tests_${{ matrix.repo }}.yaml
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Deploy Label Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
# Default to bash
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
MDBOOK_VERSION: 0.4.37 # https://github.com/rust-lang/mdBook/releases
|
||||
TERA_VERSION: 0.2.4 # https://github.com/chevdor/tera-cli/release
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Tools
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/mdbook.tar.gz https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz && \
|
||||
tar xf ${{ runner.temp }}/mdbook.tar.gz && mv mdbook /usr/local/bin && \
|
||||
wget -O ${{ runner.temp }}/tera.deb https://github.com/chevdor/tera-cli/releases/download/v${TERA_VERSION}/tera-cli_linux_amd64.deb && \
|
||||
sudo dpkg -i ${{ runner.temp }}/tera.deb
|
||||
|
||||
- name: Generate the doc
|
||||
run: ./scripts/build-doc.sh
|
||||
|
||||
- name: Check
|
||||
run: ls -al ./docs/src
|
||||
|
||||
- name: Setup Pages
|
||||
id: pages
|
||||
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
|
||||
|
||||
- name: Render book
|
||||
run: ./scripts/generate_book.sh
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
|
||||
with:
|
||||
path: ./docs/book
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
# this job will fail unless we are in the main branch
|
||||
# so we skip the job for other branches such as PRs.
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
|
||||
Reference in New Issue
Block a user