Skip to content

Bump webpack-cli from 5.1.4 to 6.0.0 in /web/pdf #190

Bump webpack-cli from 5.1.4 to 6.0.0 in /web/pdf

Bump webpack-cli from 5.1.4 to 6.0.0 in /web/pdf #190

name: Update table reference
on:
issue_comment:
types: [created]
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
REPO_LOCAL_PATH: ${{github.workspace}}/set
jobs:
doCommand:
runs-on: ubuntu-latest
if: ${{ !github.event.issue.pull_request && github.event_name == 'issue_comment' && contains(github.event.comment.body, '/update-table-reference') }}
container: ghcr.io/eclipse-set/update-table-reference:latest
permissions:
contents: write
checks: write
pull-requests: write
actions: read
issues: write
steps:
- name: Get target branch
run: |
issue_tilte="${{ github.event.issue.title }}"
branch_name=$(echo "$issue_tilte" | sed 's/ - Tables different//g')
echo "Branch name: $branch_name"
echo "TARGET_BRANCH=${branch_name}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: ${{ env.TARGET_BRANCH }}
path: ${{ env.REPO_LOCAL_PATH }}
token: ${{ env.GITHUB_TOKEN }}
- name: Add comment reaction
uses: actions/github-script@v7
with:
script: |
const payload = await github.rest.repos.getCollaboratorPermissionLevel({
...context.repo, username: context.actor
});
const userPermission = payload?.data?.permission;
let reaction = 'rocket'
if (!(userPermission == 'write' || userPermission == 'admin')) { // not a committer
// Not a committer -> abort workflow
core.setFailed("Only committers are permitted to update table reference and " + context.actor + " isn't one.")
reaction = '-1'
}
// react on comment to give early feedback that the request was understood
await github.rest.reactions.createForIssueComment({
...context.repo, comment_id: context.payload?.comment?.id, content: reaction
});
- name: Apply changes
shell: bash
run: |
ls
python -u -m updatereference \
--issueNumber=${{ github.event.issue.number }} \
--commentBody="${{ github.event.comment.body}}"
- name: Push
shell: bash
working-directory: ${{ env.REPO_LOCAL_PATH }}
run: |
git config user.name 'eclipse-set-bot'
git config user.email '[email protected]'
git status
git add -A
git commit --allow-empty -m "Update table reference"
git status
git push -f
git status