Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround until will be merged: https://github.com/actions/runner/pull/1684 #161

Open
2 tasks
github-actions bot opened this issue Oct 29, 2023 · 0 comments
Open
2 tasks
Labels
bug Something isn't working todo

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2023

Tasks

Preview Give feedback

https://api.github.com/hoverkraft-tech/ci-github-common/blob/31ca94a6a841f74bb795817a3ae58210e00fd1c2/actions/create-or-update-comment/action.yml#L23

name: "Create or update comment"
description: "Action to create or update comment in pull request or issue"
author: Hoverkraft
branding:
  icon: message-square
  color: gray-dark

inputs:
  title:
    description: "The comment title. Must be static and unique, will be used to retrieve the comment if exists already."
    required: true
  body:
    description: "The comment body. See [https://github.com/peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment)"
    required: false
  reactions:
    description: "A comma separated list of reactions to add to the comment. See [https://github.com/peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment)"
    required: false

runs:
  using: "composite"
  steps:
    - shell: bash
      # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684
      run: |
        [ -d ./self-actions ] || (mkdir -p ./self-actions/ && cp -r $GITHUB_ACTION_PATH/../* ./self-actions/)

    - id: get-issue-number
      uses: ./self-actions/get-issue-number

    - shell: bash
      # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684
      run: |
        rm -fr ./self-actions

    - uses: peter-evans/find-comment@v2
      id: find-comment
      with:
        issue-number: ${{ steps.get-issue-number.outputs.issue-number }}
        comment-author: github-actions[bot]
        body-includes: ${{ inputs.title }}

    - uses: peter-evans/create-or-update-comment@v3
      with:
        edit-mode: replace
        comment-id: ${{ steps.find-comment.outputs.comment-id }}
        issue-number: ${{ steps.get-issue-number.outputs.issue-number }}
        body: |
          ${{ inputs.title }}

          ${{ inputs.body }}
        reactions: ${{ inputs.reactions }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working todo
Projects
None yet
Development

No branches or pull requests

1 participant