Skip to content

Commit

Permalink
Update tex-pdf.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaldon authored Aug 12, 2024
1 parent a9f38e7 commit d7072cb
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/tex-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,32 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get name of branch's parent branch
run: |
echo "PARENT_BRANCH=$(git for-each-ref --format=\"%(refname:short)\" refs/heads/ | while read branch; do
echo \"$(git merge-base HEAD $branch) $branch\"
done | sort -r | head -n 1 | awk \"{print $2}\")" >> $GITHUB_ENV
# - name: Get name of branch's parent branch
# run: |
# echo "PARENT_BRANCH=$(git for-each-ref --format=\"%(refname:short)\" refs/heads/ | while read branch; do
# echo \"$(git merge-base HEAD $branch) $branch\"
# done | sort -r | head -n 1 | awk \"{print $2}\")" >> $GITHUB_ENV

# https://github.com/trilom/file-changes-action/issues/116#issuecomment-790007782
- name: Get changed files
run: |
# check to see if there's a previous commit on the branch
# if not, then diff with the parent branch
# if yes, then diff with the HEAD @ prevous commit
if [[ -z "${{ github.event.before_ref }}" ]] ; then
export DIFF=$( git diff --name-only $PARENT_BRANCH ${{ github.sha }} )
echo "Diff between $PARENT_BRANCH and ${{ github.sha }} "
else
export DIFF=$( git diff --name-only ${{ github.event.before }} ${{ github.sha }} )
echo "Diff between ${{ github.event.before }} and ${{ github.sha }} "
fi
echo "::set-output name=files::$( echo "$DIFF" | sed ':a;N;$!ba;s/\n/%0A/g' )"
# # https://github.com/trilom/file-changes-action/issues/116#issuecomment-790007782
# - name: Get changed files
# run: |
# # check to see if there's a previous commit on the branch
# # if not, then diff with the parent branch
# # if yes, then diff with the HEAD @ prevous commit
# if [[ -z "${{ github.event.before_ref }}" ]] ; then
# export DIFF=$( git diff --name-only $PARENT_BRANCH ${{ github.sha }} )
# echo "Diff between $PARENT_BRANCH and ${{ github.sha }} "
# else
# export DIFF=$( git diff --name-only ${{ github.event.before }} ${{ github.sha }} )
# echo "Diff between ${{ github.event.before }} and ${{ github.sha }} "
# fi
# echo "::set-output name=files::$( echo "$DIFF" | sed ':a;N;$!ba;s/\n/%0A/g' )"

# # https://github.com/Ana06/get-changed-files/releases/tag/v1.2
# - uses: Ana06/get-changed-files@25f79e676e7ea1868813e21465014798211fad8c
# id: files
# with:
# format: space-delimited
# https://github.com/Ana06/get-changed-files/releases/tag/v1.2
- uses: Ana06/get-changed-files@25f79e676e7ea1868813e21465014798211fad8c
id: files
with:
format: space-delimited

- name: Config github actions bot
run: |
Expand Down

0 comments on commit d7072cb

Please sign in to comment.