Skip to content

Commit

Permalink
updated approved-label build file
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuredra committed Sep 23, 2023
1 parent d1be90b commit 05b5d30
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 20 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/approved-label.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
on: pull_request_review
name: Add "approved" label when approved

on:
pull_request_review:
types:
- submitted

jobs:
add_label:
name: Add "approved" label when approved
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2 # Make sure to use the latest version

- name: Check for approval
id: check_approval
run: echo "::set-output name=approved::${{ github.event.review.state == 'approved' }}"

- name: Add "approved" label
if: steps.check_approval.outputs.approved == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Adding 'approved' label"
gh pr edit ${{ github.event.pull_request.number }} --add-label approved
- name: Add "approved" label when approved
uses: pullreminders/label-when-approved-action@main
env:
APPROVALS: "1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "approved"
REMOVE_LABEL: ""
36 changes: 36 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Doxygen CI

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install requirements
run: |
brew install graphviz ninja doxygen
- name: configure
run: cmake -G Ninja -B ./build -S .
- name: build
run: cmake --build build -t doc
- name: gh-pages
uses: actions/checkout@v3
with:
ref: "gh-pages"
clean: false
- name: Move & Commit files
run: |
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
rm -rf d* && rm *.html && rm *.svg && rm *.map && rm *.md5 && rm *.png && rm *.js && rm *.css
git add .
cp -rp ./build/html/* . && rm -rf ./build && ls -lah
git add .
git commit -m "Documentation for $GITHUB_SHA" || true
git push --force || true

0 comments on commit 05b5d30

Please sign in to comment.