-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use another action for PR commit with text from file
- Loading branch information
Showing
1 changed file
with
12 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |