Skip to content

Commit

Permalink
fix: use another action for PR commit with text from file
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Feb 6, 2024
1 parent 907e919 commit e311804
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/pull-request-24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,19 @@ jobs:
# todo: add check for message.txt content
# mv code-list-new-sorted.csv "CRL/Rec24/current/code-list.csv"
- name: Set variables
- uses: actions/upload-artifact@v1
if: ${{ hashFiles('message.txt') != '' }}
run: |
MSG=$(cat message.txt)
echo "MESSAGE=$MSG" >> $GITHUB_ENV
- name: Comment a pull_request
with:
name: message.txt
path: output
- uses: actions/download-artifact@v1
if: ${{ hashFiles('message.txt') != '' }}
uses: mb2dev/[email protected]
with:
message: |
message:
${{ env.MESSAGE }}
name: results
- name: comment PR
if: ${{ hashFiles('message.txt') != '' }}
uses: machine-learning-apps/pr-comment@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add "CLR/Rec24/current/code-list.csv"
timestamp=$(date -u)
git commit -F message.txt || exit 0
git push
with:
path: results/message.txt

0 comments on commit e311804

Please sign in to comment.