Skip to content

Commit

Permalink
fix something
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Jun 26, 2024
1 parent b315109 commit bcd2d9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 47 deletions.
52 changes: 6 additions & 46 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
issue-number: ${{ github.event.issue.number }}
body: |
Hi @${{ github.event.issue.user.login }}.
RR-${{ env.model }} is being build and package and will be sent to your email later..
RR-${{ env.model }} building ...
> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
----
emoji: heart
Expand Down Expand Up @@ -233,25 +233,14 @@ jobs:
if [ "${{ env.format }}" = "ova" ]; then
. scripts/func.sh "${{ secrets.RRORG }}"
convertova "rr/rr.img" "rr/rr.ova"
ARTIFACTS="rr-${MODEL}-${TAG}-${{ github.run_id }}.ova.zip"
(cd rr; sha256sum rr.ova >../sha256sum)
zip -9 "${ARTIFACTS}" -j rr/rr.ova sha256sum
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.ova.zip" -j rr/rr.ova sha256sum
else
ARTIFACTS="rr-${MODEL}-${TAG}-${{ github.run_id }}.img.zip"
(cd rr; sha256sum rr.img >../sha256sum)
zip -9 "${ARTIFACTS}" -j rr/rr.img sha256sum
zip -9 "rr-${MODEL}-${TAG}-${{ github.run_id }}.img.zip" -j rr/rr.img sha256sum
fi
# UPLOAD="$(curl -k -F "file=@${ARTIFACTS}" -F "token=${{ secrets.TT_TOKEN }}" -F "model=0" -X POST "https://tmp-cli.vx-cdn.com/app/upload_cli")"
if echo "${UPLOAD}" | grep -q "Download Page"; then
DLURL="$(echo "${UPLOAD}" | grep "Download Page" | head -1)"
else
DLURL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - Actions artifacts."
fi
EMAIL=$(curl -s -H "Authorization: token ${{ secrets.ACTION }}" "https://api.github.com/users/${{ github.event.issue.user.login }}" | jq -r '.email')
echo "TAG=${TAG}" >> $GITHUB_ENV
echo "EMAIL=${EMAIL}" >> $GITHUB_ENV
echo "DLURL=${DLURL}" >> $GITHUB_ENV
- name: Upload to Artifacts
if: env.iscustom == 'true' && success()
Expand All @@ -262,37 +251,8 @@ jobs:
rr-${{ env.model }}-${{ env.TAG }}*.zip
retention-days: 5

- name: Send mail
if: env.iscustom == 'true' && success() && env.EMAIL != 'null'
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp-mail.outlook.com
server_port: 587
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: rr-${{ env.model }}-${{ env.TAG }}
to: ${{ env.EMAIL }}
from: ${{ secrets.MAIL_USERNAME }}
body: |
${{ env.DLURL }}
- name: Update Comment Success
if: env.iscustom == 'true' && success() && env.EMAIL != 'null'
uses: actions-cool/issues-helper@v3
with:
actions: 'update-comment'
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.comment.outputs.comment-id }}
update-mode: replace
body: |
Hi @${{ github.event.issue.user.login }}.
RR-${{ env.model }} has been sent to your email.
> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
----
emoji: hooray

- name: Update Comment Success
if: env.iscustom == 'true' && success() && env.EMAIL == 'null'
if: env.iscustom == 'true' && success()
uses: actions-cool/issues-helper@v3
with:
actions: 'update-comment'
Expand All @@ -301,7 +261,7 @@ jobs:
update-mode: replace
body: |
Hi @${{ github.event.issue.user.login }}.
${{ env.DLURL }}
RR-${{ env.model }} build success, please download the attachment from the below link.
> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
----
emoji: hooray
Expand All @@ -324,7 +284,7 @@ jobs:
update-mode: replace
body: |
Hi @${{ github.event.issue.user.login }}.
RR-${{ env.model }} failed to build and package, please try again.
RR-${{ env.model }} build failed, please try again.
> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
----
emoji: confused
2 changes: 1 addition & 1 deletion files/initrd/opt/rr/menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3559,7 +3559,7 @@ else
b)
DIALOG --title "$(TEXT "Main menu")" \
--infobox "$(TEXT "Reboot to BIOS")" 0 0
efibootmgr -n 0000
efibootmgr -n 0000 >/dev/null 2>&1
reboot
exit 0
;;
Expand Down

0 comments on commit bcd2d9f

Please sign in to comment.