Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
clement2026 committed Sep 24, 2024
1 parent aaac1ee commit 507791f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/comment.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
---
name: comment
permissions: read-all
on: [ workflow_dispatch, pull_request ]

env:
CSV_FILE_PREFIX: https://pub-95669c22c66d453c92c62f20aa0c5b57.r2.dev
BUCKET: github-action
BASE: main
JOBS: "main_again pr"

jobs:
comment:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: print md
id: set_content
run: |
CONTENT="abc"
echo $CONTENT >> "$GITHUB_STEP_SUMMARY"
echo "::set-output name=content::$CONTENT"
- name: 'comment PR'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${{ steps.set_content.outputs.content }}`
})
#---
#name: comment
#permissions: read-all
#on: [ workflow_dispatch, pull_request ]
#
#env:
# CSV_FILE_PREFIX: https://pub-95669c22c66d453c92c62f20aa0c5b57.r2.dev
# BUCKET: github-action
# BASE: main
# JOBS: "main_again pr"
#
#jobs:
# comment:
# permissions: write-all
# runs-on: ubuntu-latest
# steps:
# - name: print md
# id: set_content
# run: |
# CONTENT="abc"
# echo $CONTENT >> "$GITHUB_STEP_SUMMARY"
# echo "::set-output name=content::$CONTENT"
# - name: 'comment PR'
# uses: actions/github-script@v7
# with:
# script: |
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: `${{ steps.set_content.outputs.content }}`
# })
8 changes: 4 additions & 4 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ jobs:
id: set_content
run: |
CONTENT=""
CONTENT+="[archive.zip]($CSV_FILE_PREFIX/$ZIP_OBJECT_NAME)"
CONTENT+="[archive.zip]($CSV_FILE_PREFIX/$ZIP_OBJECT_NAME)\n\n"
for job in $JOBS; do
CONTENT+="### $job"
CONTENT+="## $job\n\n"
varname=COMPARE_READ_OBJECT_NAME_$job
CONTENT+="![]($CSV_FILE_PREFIX/${!varname})"
CONTENT+="![]($CSV_FILE_PREFIX/${!varname})\n"
varname=COMPARE_WRITE_OBJECT_NAM_$job
CONTENT+="![]($CSV_FILE_PREFIX/${!varname})"
CONTENT+="![]($CSV_FILE_PREFIX/${!varname})\n"
done
echo $CONTENT >> "$GITHUB_STEP_SUMMARY"
echo "::set-output name=content::$CONTENT"
Expand Down

0 comments on commit 507791f

Please sign in to comment.