Skip to content

Commit

Permalink
change directory before running git command
Browse files Browse the repository at this point in the history
  • Loading branch information
nashcft committed Sep 25, 2022
1 parent b1f06ba commit c885a95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CommentPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
env:
BRANCH_NAME: companion_${{ github.event.workflow_run.head_branch }}
run: |
cd temp_docs/
cd $GITHUB_WORKSPACE/temp_docs/
git switch -C $BRANCH_NAME
mkdir -p docs/screenshots/
cp -a ../preview-screenshots/out/failures/delta* docs/screenshots/
Expand All @@ -60,10 +60,9 @@ jobs:
git config --global remote.pushDefault origin
git commit -m "Upload screenshots to github page."
git push -f
cd ..
cd preview-screenshots/out/failures
cd $GITHUB_WORKSPACE/preview-screenshots/out/failures
echo ::set-output name=images::$(ls -d delta* | jq -R -s -c 'split("\n")[:-1]' | jq -r --arg IMAGE_PATH "https://raw.githubusercontent.com/droidkaigi/conference-app-2022/$BRANCH_NAME/docs/screenshots/" '.[] |= $IMAGE_PATH + .')
cd ../../../
cd $GITHUB_WORKSPACE/
- name: Build PR Comment with Preview
id: pr_comment
Expand Down Expand Up @@ -102,6 +101,7 @@ jobs:
TARGET_BRANCH_PREFIX: companion_
DATE_FORMAT: '%Y%m%d'
run: |
cd $GITHUB_WORKSPACE/temp_docs/
expired_date=`date --date="$EXPIRED_TERM" "+${DATE_FORMAT}"`
git fetch --all
git branch -r | grep "[^* ]+" -Eo | grep "${REMOTE_REPO}/${TARGET_BRANCH_PREFIX}.+" -Eo |
Expand Down

0 comments on commit c885a95

Please sign in to comment.