Skip to content

Off-chain Messages

Off-chain Messages #27

Workflow file for this run

name: Continuous Integration
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
- edited
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
save-pr:
name: Save PR Number
runs-on: ubuntu-latest
steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
MERGE_SHA: ${{ github.sha }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
echo $PR_SHA > ./pr/pr_sha
echo $MERGE_SHA > ./pr/merge_sha
- name: Upload PR Number
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
with:
name: pr_number
path: pr/
codespell:
name: CodeSpell
runs-on: ubuntu-latest
steps:
- name: Checkout CIP Repository
uses: actions/checkout@v3
- name: Get Changed Files
id: changed
continue-on-error: true
run: |
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV
gh pr diff ${{ github.event.number }} --name-only | sed -e 's|$|,|' | xargs -i echo "{}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run CodeSpell
uses: codespell-project/actions-codespell@v2
if: steps.changed.outcome == 'success'
with:
check_filenames: true
path: ${{ env.CHANGED_FILES }}
skip: .git,Gemfile.lock,**/*.png,**/*.gif,**/*.jpg,**/*.svg,vendor,_site,_config.yml,style.css
ignore_words_file: .codespellignore
markdownlint:
name: Markdown Linter
runs-on: ubuntu-latest
steps:
- name: Checkout CIP Repository
uses: actions/checkout@v3
- name: Get Changed Files
id: changed
continue-on-error: true
run: |
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV
gh pr diff ${{ github.event.number }} --name-only | grep -E -x '[^/]+\.md|CIPS/cip-[0-9]+\.md' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
uses: DavidAnson/markdownlint-cli2-action@v10
if: steps.changed.outcome == 'success'
with:
command: config
globs: |
config/.markdownlint.yaml
${{ env.CHANGED_FILES }}