Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
BattleCh1cken committed May 8, 2024
1 parent a1357fc commit 25bcc30
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@ runs:
TEMPLATE: ${{ steps.template.outputs.template }}
shell: bash

- run: echo $TEMPLATE
shell: bash

- name: Get short SHA
if: ${{ env.TEMPLATE == 0 && inputs.upload-built-template}}
if: ${{ env.TEMPLATE == 1 && inputs.upload-built-template}}
id: short-sha
shell: bash
run: |
if [ ${{ github.event.action }} = opened ]; then
if [ $ACTION = opened ]; then
# we have to get the head sha directly from the pr api, because github silly ig
echo "then"
sha=$(wget -O- --quiet https://api.github.com/repos/LemLib/LemLib/pulls/${{ github.event.number }} | jq -r .head.sha | head -c 6)
sha=$(wget -O- --quiet https://api.github.com/repos/LemLib/LemLib/pulls/$PR_NUM | jq -r .head.sha | head -c 6)
else
echo "else"
sha=$(echo ${{ github.event.after }} | head -c 6)
sha=$(echo $AFTER | head -c 6)
fi
echo "sha=$sha" >> $GITHUB_OUTPUT
env:
AFTER: ${{ github.event.after }} # this isn't present for pr opened events
ACTION: ${{github.event.action}}
PR_NUM: ${{github.event.number}}
SHA: ${{ steps.short-sha.outputs.sha }}

#- name: Install ARM Toolchain
Expand Down

0 comments on commit 25bcc30

Please sign in to comment.