Bump github.com/containers/image/v5 from 5.27.0 to 5.33.0 #633
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: add-ok-to-test-label-on-pr-comment | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, edited, ready_for_review, locked, unlocked, review_requested, review_request_removed] | |
pull_request_review_comment: | |
types: [created, edited] | |
issue_comment: | |
types: [created, edited] | |
jobs: | |
# if PR do not have "ok-to-test" label, ask for "/ok-to-test" comment | |
ask-for-ok-to-test: | |
permissions: | |
issues: write | |
pull-requests: write | |
# if triggered by a PR comment, skip this job | |
if: ${{ github.event_name != 'pull_request_review_comment' && github.event_name != 'issue_comment' && github.actor != 'dependabot[bot]' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
if: ${{ !contains(github.event.pull_request.labels.*.name, '/ok-to-test') }} | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: "@kaovilai Please add a comment with `/ok-to-test` to trigger the e2e" | |
}) | |
# if PR comment contains "/ok-to-test" from a @kaovilai, add "ok-to-test" label | |
ok-to-test: | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.event.comment.body, '/ok-to-test') && github.actor == 'kaovilai' || github.actor == 'dependabot[bot]' }} | |
steps: | |
- uses: actions/github-script@v6 | |
with: #https://github.com/settings/tokens?type=beta | |
github-token: ${{secrets.LABELER_PAT}} | |
script: | | |
github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ["/ok-to-test"] | |
}) |