feat: working on TUI, working on vili ordering #23
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: Obidog | |
on: | |
issue_comment: | |
types: [created, edited] | |
jobs: | |
obidog: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: khan/pull-request-comment-trigger@v1.1.0 | |
id: check | |
with: | |
trigger: '!obidog' | |
reaction: rocket | |
env: | |
GITHUB_TOKEN: '${{ secrets.GHCR_TOKEN }}' | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: '${{ secrets.GHCR_TOKEN }}' | |
if: steps.check.outputs.triggered == 'true' | |
- name: Checkout PR | |
env: | |
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }} | |
run: gh pr checkout ${{ github.event.issue.number }} | |
if: steps.check.outputs.triggered == 'true' | |
- run: docker run -e OBENGINE_GIT_DIRECTORY=/obengine -v ${PWD}:/obengine --user $(id -u):$(id -u) ghcr.io/obengine/obidog:1.0.0 bindings | |
if: steps.check.outputs.triggered == 'true' | |
- name: Check status | |
env: | |
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }} | |
run: git status | |
if: steps.check.outputs.triggered == 'true' | |
- name: Configure commit owner | |
run: | | |
export ci_user_infos=$(curl -s https://${{ secrets.GHCR_TOKEN }}:@api.github.com/user) | |
export ci_pat_user=$(echo $ci_user_infos | jq -r .name) | |
export ci_pat_id=$(echo $ci_user_infos | jq -r .id) | |
git config --global user.email "$ci_pat_id+$ci_pat_user@users.noreply.github.com" | |
git config --global user.name "$ci_pat_user" | |
shell: bash | |
if: steps.check.outputs.triggered == 'true' | |
- name: Push changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }} | |
run: 'git add . && git commit -m "chore: regenerated bindings (automated)" && git push' | |
if: steps.check.outputs.triggered == 'true' | |
- name: Send completion comment | |
uses: actions/github-script@v5 | |
if: steps.check.outputs.triggered == 'true' | |
with: | |
github-token: ${{secrets.GHCR_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Bindings successfully regenerated using Obidog 🐶' | |
}) |