[Bug]: Every time my mac wake after sleep, Thaw reload itself, reloading every app that have an icon in menu bar causing duplicate of some apps #186
This file contains hidden or 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
| name: PR Command Trigger | |
| on: | |
| issue_comment: | |
| types: [created] | |
| jobs: | |
| trigger-build: | |
| if: github.event.issue.pull_request && startsWith(github.event.comment.body, '.build') | |
| runs-on: ubuntu-slim | |
| permissions: | |
| actions: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Parse command | |
| id: command | |
| uses: github/command@76d69a2a6b747d621fba374d707409f89114c620 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| command: ".build" | |
| permissions: write | |
| - name: Get PR Details | |
| if: steps.command.outputs.continue == 'true' | |
| id: get-branch | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| PR_URL="${{ github.event.issue.pull_request.url }}" | |
| PR_BRANCH=$(gh api "$PR_URL" --jq '.head.ref') | |
| PR_HEAD_REPO=$(gh api "$PR_URL" --jq '.head.repo.full_name') | |
| SAME_REPO=false | |
| if [ "$PR_HEAD_REPO" = "${{ github.repository }}" ]; then | |
| SAME_REPO=true | |
| fi | |
| echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT | |
| echo "same_repo=$SAME_REPO" >> $GITHUB_OUTPUT | |
| echo "Detected branch: $PR_BRANCH" | |
| echo "PR head repository: $PR_HEAD_REPO" | |
| - name: Trigger Build DMG Workflow | |
| if: steps.command.outputs.continue == 'true' && steps.get-branch.outputs.same_repo == 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BRANCH: ${{ steps.get-branch.outputs.branch }} | |
| run: | | |
| gh workflow run build-dmg.yml --ref "$BRANCH" -R "${{ github.repository }}" | |
| - name: Comment on PR | |
| if: steps.command.outputs.continue == 'true' && steps.get-branch.outputs.same_repo == 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| PR_NUMBER="${{ github.event.issue.number }}" | |
| gh pr comment "$PR_NUMBER" --body "Build triggered for branch \`${{ steps.get-branch.outputs.branch }}\`. Check the Actions tab for progress." -R "${{ github.repository }}" | |
| - name: Comment on PR for fork | |
| if: steps.command.outputs.continue == 'true' && steps.get-branch.outputs.same_repo == 'false' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| PR_NUMBER="${{ github.event.issue.number }}" | |
| gh pr comment "$PR_NUMBER" --body "Build was not triggered automatically because this pull request comes from a fork. A maintainer can trigger it manually by running the \`build-dmg\` workflow against branch \`${{ steps.get-branch.outputs.branch }}\`." -R "${{ github.repository }}" |