Update patches doc #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update patches doc | |
permissions: | |
# actions: none | |
# checks: none | |
# contents: write | |
# deployments: none | |
# issues: none | |
# packages: none | |
pull-requests: write | |
# repository-projects: none | |
# security-events: none | |
# statuses: none | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- 'build/**' | |
workflow_dispatch: | |
inputs: | |
rtag: | |
description: 'uazo/cromite TAG or COMMIT' | |
required: true | |
default: '' | |
env: | |
RTAG: ${{ github.event.inputs.rtag }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 'uazo/cromite' ${{ env.BRANCH }} | |
uses: actions/checkout@v2 | |
with: | |
repository: 'uazo/cromite' | |
ref: ${{ github.event.inputs.rtag }} | |
fetch-depth: 1 | |
- name: Generate patches doc | |
run: | | |
bash ./tools/extract-all-patch-data.sh ./build/patches | |
- name: Check differences CHANGES=${{ env.CHANGES }} | |
run: | | |
CHANGES=0 && git diff --quiet || CHANGES=1 | |
echo "CHANGES=$CHANGES" >> $GITHUB_ENV | |
if [[ CHANGES -eq 1 ]]; then | |
git add docs/*.md | |
fi | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a #v3.12.0 | |
if: env.CHANGES == '1' | |
with: | |
token: ${{ secrets.CROMITE_PULLS }} | |
path: cromite | |
base: ${{ env.BRANCH }} | |
add-paths: | | |
build/patches/*.patch | |
commit-message: '[AUTO][DOC] Generate patches doc for master branch' | |
title: '[AUTO][DOC] Generate patches doc for master branch' | |
body: ${{ env.MESSAGE }} | |
delete-branch: true | |
branch-suffix: short-commit-hash |