From 7306b955a9a817a8114b71e260d8638c4dfd2476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=8A=E1=B4=8F=E1=B4=87=20=E1=B4=84=CA=9C=E1=B4=87?= =?UTF-8?q?=C9=B4?= Date: Sat, 31 Jan 2026 13:29:30 -0500 Subject: [PATCH] ci: use external unknwon/send-email-on-failure action (#8127) --- .github/workflows/digitalocean_gc.yml | 16 +----- .github/workflows/docker.yml | 80 +++++---------------------- .github/workflows/go.yml | 32 ++--------- .github/workflows/release.yml | 16 +----- 4 files changed, 27 insertions(+), 117 deletions(-) diff --git a/.github/workflows/digitalocean_gc.yml b/.github/workflows/digitalocean_gc.yml index c69d72d26..42344729c 100644 --- a/.github/workflows/digitalocean_gc.yml +++ b/.github/workflows/digitalocean_gc.yml @@ -19,18 +19,8 @@ jobs: # --include-untagged-manifests: Deletes unreferenced manifests to maximize space doctl registry garbage-collection start --force --include-untagged-manifests - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 57564d926..c0e2ade52 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -68,21 +68,11 @@ jobs: image-ref: gogs/gogs:latest exit-code: '1' - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} buildx-next: if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'gogs/gogs' }} @@ -145,21 +135,11 @@ jobs: image-ref: gogs/gogs:next-latest exit-code: '1' - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} deploy-demo: if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'gogs/gogs' }} @@ -181,21 +161,11 @@ jobs: kubectl rollout restart deployment gogs-demo -n gogs kubectl rollout status deployment gogs-demo -n gogs - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} buildx-pull-request: if: ${{ github.event_name == 'pull_request'}} @@ -324,21 +294,11 @@ jobs: gogs/gogs:${{ env.IMAGE_TAG }} ghcr.io/gogs/gogs:${{ env.IMAGE_TAG }} - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} # Updates to the following section needs to be synced to all release branches within their lifecycles. buildx-next-release: @@ -389,21 +349,11 @@ jobs: gogs/gogs:next-${{ env.IMAGE_TAG }} ghcr.io/gogs/gogs:next-${{ env.IMAGE_TAG }} - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} digitalocean-gc: if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'gogs/gogs' }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index da4e84cb2..7128d063e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -79,21 +79,11 @@ jobs: file: ./coverage flags: unittests - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} # Running tests with race detection consumes too much memory on Windows, # see https://github.com/golang/go/issues/46099 for details. @@ -119,21 +109,11 @@ jobs: file: ./coverage flags: unittests - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }} postgres: name: Postgres diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9700926b5..05e6fd48b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -140,17 +140,7 @@ jobs: if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }} steps: - name: Send email on failure - uses: dawidd6/action-send-mail@2cea9617b09d79a095af21254fbcb7ae95903dde # v3.12.0 + uses: unknwon/send-email-on-failure@89339a1bc93f4ad1d30f3b7e4911fcba985c9adb # v1 with: - server_address: smtp.mailgun.org - server_port: 465 - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: GitHub Actions (${{ github.repository }}) job result - to: github-actions-8ce6454@unknwon.io - from: GitHub Actions (${{ github.repository }}) - reply_to: noreply@unknwon.io - body: | - The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}". - - View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + smtp_username: ${{ secrets.SMTP_USERNAME }} + smtp_password: ${{ secrets.SMTP_PASSWORD }}