From 490e23417cbc914322d18c57fbcb5f7f9d9a7808 Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Fri, 21 Feb 2025 10:14:29 -0700 Subject: [PATCH] ci: add workflow ref to notifications --- .github/workflows/deploy-clean.yml | 4 ++-- .github/workflows/deploy-docker-dockerhub.yml | 20 +++++++++++-------- .github/workflows/deploy-docker-github.yml | 20 +++++++++++-------- .github/workflows/issues-scan.yml | 6 ++++-- 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy-clean.yml b/.github/workflows/deploy-clean.yml index 63b1c5cd..c34f1987 100644 --- a/.github/workflows/deploy-clean.yml +++ b/.github/workflows/deploy-clean.yml @@ -194,7 +194,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }} - embed-title: "**${{ github.workflow_ref }}**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-description: | @@ -230,7 +230,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }} - embed-title: "**Deployment Cleanup Workflow Ran**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-description: | diff --git a/.github/workflows/deploy-docker-dockerhub.yml b/.github/workflows/deploy-docker-dockerhub.yml index 1e710897..12cef167 100644 --- a/.github/workflows/deploy-docker-dockerhub.yml +++ b/.github/workflows/deploy-docker-dockerhub.yml @@ -405,7 +405,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }} - embed-title: "📦 **Deploy › Docker › Github Workflow Ran**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-description: | @@ -419,7 +419,9 @@ jobs: - Pull URL: https://ghcr.io/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }} - Branch: `${{ github.ref_name }}` - Workflow: `${{ github.workflow }} (#${{github.run_number}})` + - Runner: `${{ runner.name }}` - Triggered By: `${{ github.actor }}` + - Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}` ### Tags -# This docker image will use the following tags: @@ -437,9 +439,9 @@ jobs: embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }} embed-footer-text: "Completed at ${{ env.NOW }} UTC" embed-timestamp: "${{ env.NOW_LONG }}" - embed-author-name: "${{ github.event.release.author.name }}" - embed-author-url: "${{ github.event.release.author.html_url }}" - embed-author-icon-url: "${{ github.event.release.author.avatar_url }}" + embed-author-name: "${{ github.repository_owner }}" + embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462" # # # Job › Docker Release › Dockerhub › Amd64 @@ -647,7 +649,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }} - embed-title: "📦 **Deploy › Docker › Github Workflow Ran**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-description: | @@ -661,7 +663,9 @@ jobs: - Pull URL: https://ghcr.io/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }} - Branch: `${{ github.ref_name }}` - Workflow: `${{ github.workflow }} (#${{github.run_number}})` + - Runner: `${{ runner.name }}` - Triggered By: `${{ github.actor }}` + - Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}` ### Tags -# This docker image will use the following tags: @@ -679,6 +683,6 @@ jobs: embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }} embed-footer-text: "Completed at ${{ env.NOW }} UTC" embed-timestamp: "${{ env.NOW_LONG }}" - embed-author-name: "${{ github.event.release.author.name }}" - embed-author-url: "${{ github.event.release.author.html_url }}" - embed-author-icon-url: "${{ github.event.release.author.avatar_url }}" + embed-author-name: "${{ github.repository_owner }}" + embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462" diff --git a/.github/workflows/deploy-docker-github.yml b/.github/workflows/deploy-docker-github.yml index 88aa5f1e..a455bc9d 100644 --- a/.github/workflows/deploy-docker-github.yml +++ b/.github/workflows/deploy-docker-github.yml @@ -403,7 +403,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }} - embed-title: "📦 **Deploy › Docker › Github Workflow Ran**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-description: | @@ -417,7 +417,9 @@ jobs: - Pull URL: https://ghcr.io/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }} - Branch: `${{ github.ref_name }}` - Workflow: `${{ github.workflow }} (#${{github.run_number}})` + - Runner: `${{ runner.name }}` - Triggered By: `${{ github.actor }}` + - Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}` ### Tags -# This docker image will use the following tags: @@ -435,9 +437,9 @@ jobs: embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }} embed-footer-text: "Completed at ${{ env.NOW }} UTC" embed-timestamp: "${{ env.NOW_LONG }}" - embed-author-name: "${{ github.event.release.author.name }}" - embed-author-url: "${{ github.event.release.author.html_url }}" - embed-author-icon-url: "${{ github.event.release.author.avatar_url }}" + embed-author-name: "${{ github.repository_owner }}" + embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462" # # # Job › Docker Release › Github › Amd64 @@ -641,7 +643,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_RELEASES }} - embed-title: "📦 **Deploy › Docker › Github Workflow Ran**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://i.imgur.com/zDIzE8T.jpg' embed-description: | @@ -655,7 +657,9 @@ jobs: - Pull URL: https://ghcr.io/${{ env.IMAGE_AUTHOR }}/${{ env.IMAGE_NAME }} - Branch: `${{ github.ref_name }}` - Workflow: `${{ github.workflow }} (#${{github.run_number}})` + - Runner: `${{ runner.name }}` - Triggered By: `${{ github.actor }}` + - Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}` ### Tags -# This docker image will use the following tags: @@ -673,6 +677,6 @@ jobs: embed-color: ${{ job.status == 'success' && '5763719' || '15418782' }} embed-footer-text: "Completed at ${{ env.NOW }} UTC" embed-timestamp: "${{ env.NOW_LONG }}" - embed-author-name: "${{ github.event.release.author.name }}" - embed-author-url: "${{ github.event.release.author.html_url }}" - embed-author-icon-url: "${{ github.event.release.author.avatar_url }}" + embed-author-name: "${{ github.repository_owner }}" + embed-author-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + embed-author-icon-url: "https://avatars.githubusercontent.com/u/200161462" diff --git a/.github/workflows/issues-scan.yml b/.github/workflows/issues-scan.yml index 6922745e..5d1ad9a2 100644 --- a/.github/workflows/issues-scan.yml +++ b/.github/workflows/issues-scan.yml @@ -824,7 +824,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }} - embed-title: "🎫 **Issues › Scan Workflow Ran**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png' embed-description: | @@ -835,6 +835,7 @@ jobs: The PR will be assigned tags depending on the outcome of the code scan. If issues are detected in the code, a list of each file and issue will be posted in the PR. - Workflow: `${{ github.workflow }} (#${{github.run_number}})` + - Runner: `${{ runner.name }}` - Triggered By: `${{ github.actor }}` - Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}` @@ -874,7 +875,7 @@ jobs: username: 'Io' avatar-url: 'https://i.imgur.com/8BVDkla.jpg' webhook-url: ${{ secrets.DISCORD_WEBHOOK_CHAN_GITHUB_TVAPP2_WORKfLOWS }} - embed-title: "**Issues › Scan Workflow Ran**" + embed-title: "⚙️ ${{ github.workflow_ref }}" embed-url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" embed-thumbnail-url: 'https://cdn.pixabay.com/photo/2022/01/30/13/33/github-6980894_960_720.png' embed-description: | @@ -885,6 +886,7 @@ jobs: The PR will be assigned tags depending on the outcome of the code scan. If issues are detected in the code, a list of each file and issue will be posted in the PR. - Workflow: `${{ github.workflow }} (#${{github.run_number}})` + - Runner: `${{ runner.name }}` - Triggered By: `${{ github.actor }}` - Status: `${{ job.status == 'success' && '✅ Successful' || '❌ Failed' }}`