Adding upstream version 0.8.9.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
3b2c48b5e4
commit
c0c4addb85
285 changed files with 25880 additions and 0 deletions
16
.github/pull_request_template.md
vendored
Normal file
16
.github/pull_request_template.md
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!--
|
||||
|
||||
Thank you for contributing to the shoutrrr project! 🙏
|
||||
|
||||
We truly appreciate all the contributions we get from the community.
|
||||
To make your PR experience as smooth as possible, make sure that you
|
||||
include the following in your PR:
|
||||
|
||||
- What your PR contributes
|
||||
- Which issues it solves (preferrably using auto closing instructions like "closes #123".
|
||||
- Tests that verify the code your contributing
|
||||
- Updates to the documentation
|
||||
|
||||
Thank you again! ✨
|
||||
|
||||
-->
|
66
.github/workflows/build.yaml
vendored
Normal file
66
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
snapshot:
|
||||
description: "Whether to run in snapshot mode"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
TAG: ${{ github.ref_name }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v6
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@29694d72cd5e7ef3b09496b39f28a942af47737e
|
||||
with:
|
||||
go-version: 1.24.3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@6d4b68b490aef8836e8fb5e50ee7b3bdfa5894f0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@6d4b68b490aef8836e8fb5e50ee7b3bdfa5894f0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@90c43f2c197eeb47adb636c4329af34ae5a2a5f0
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: v2.7.0
|
||||
args: release --clean ${{ inputs.snapshot && '--snapshot' || '' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2
|
||||
if: success()
|
||||
with:
|
||||
subject-path: "dist/**/*"
|
32
.github/workflows/clean-cache.yaml
vendored
Normal file
32
.github/workflows/clean-cache.yaml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Cache cleanup
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cleanup
|
||||
run: |
|
||||
echo "Fetching list of cache key"
|
||||
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
|
||||
|
||||
## Setting this to not fail the workflow while deleting cache keys.
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cacheKey in $cacheKeysForPR
|
||||
do
|
||||
gh cache delete $cacheKey
|
||||
done
|
||||
echo "Done"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
|
56
.github/workflows/docs.yaml
vendored
Normal file
56
.github/workflows/docs.yaml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: Publish Docs
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
|
||||
|
||||
- name: Configure Git Credentials
|
||||
run: |
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@29694d72cd5e7ef3b09496b39f28a942af47737e
|
||||
with:
|
||||
go-version: "1.24"
|
||||
|
||||
- name: Generate Service Config Docs
|
||||
run: |
|
||||
go mod download
|
||||
go clean -cache # Clear build cache
|
||||
./generate-service-config-docs.sh
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
||||
with:
|
||||
python-version: "3.13.3"
|
||||
cache: "pip"
|
||||
cache-dependency-path: |
|
||||
docs-requirements.txt
|
||||
|
||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
key: mkdocs-material-${{ env.cache_id }}
|
||||
path: .cache
|
||||
|
||||
restore-keys: |
|
||||
mkdocs-material-
|
||||
|
||||
- name: Install mkdocs
|
||||
run: |
|
||||
pip install -r docs-requirements.txt
|
||||
|
||||
- name: Build and Deploy
|
||||
run: mkdocs gh-deploy --force --verbose
|
36
.github/workflows/lint.yaml
vendored
Normal file
36
.github/workflows/lint.yaml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: Lint
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Run Linter
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@29694d72cd5e7ef3b09496b39f28a942af47737e
|
||||
with:
|
||||
go-version: "1.24.3"
|
||||
|
||||
- name: Install dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@4d56fa9e3c67fb4afa92b38c99fc7f20f5eeff4e
|
||||
with:
|
||||
args: --timeout=5m --config= # Use default linter settings
|
||||
|
||||
- name: Format Go code
|
||||
run: |
|
||||
go fmt ./...
|
||||
|
||||
- name: Check for uncommitted changes after formatting
|
||||
run: |
|
||||
git diff --exit-code || (echo "Detected unformatted files. Run 'go fmt' to format your code."; exit 1)
|
20
.github/workflows/pull-request.yaml
vendored
Normal file
20
.github/workflows/pull-request.yaml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: Pull Request
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
uses: ./.github/workflows/lint.yaml
|
||||
|
||||
test:
|
||||
uses: ./.github/workflows/test.yaml
|
32
.github/workflows/release-dev.yaml
vendored
Normal file
32
.github/workflows/release-dev.yaml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Push to main
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags-ignore:
|
||||
- "v*"
|
||||
paths-ignore:
|
||||
- "docs/*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
packages: write
|
||||
id-token: write
|
||||
attestations: write
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
uses: ./.github/workflows/lint.yaml
|
||||
|
||||
test:
|
||||
uses: ./.github/workflows/test.yaml
|
||||
|
||||
build-and-publish:
|
||||
uses: ./.github/workflows/build.yaml
|
||||
secrets: inherit
|
||||
needs:
|
||||
- test
|
||||
with:
|
||||
snapshot: true
|
37
.github/workflows/release-production.yaml
vendored
Normal file
37
.github/workflows/release-production.yaml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Release (Production)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch: {}
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
uses: ./.github/workflows/lint.yaml
|
||||
|
||||
test:
|
||||
uses: ./.github/workflows/test.yaml
|
||||
|
||||
build:
|
||||
uses: ./.github/workflows/build.yaml
|
||||
secrets: inherit
|
||||
needs:
|
||||
- test
|
||||
|
||||
renew-docs:
|
||||
name: Refresh pkg.go.dev
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Pull new module version
|
||||
uses: nicholas-fedor/go-proxy-pull-action@ad5d0f8b44e5478055cf78227eb300d2b02786f2
|
||||
with:
|
||||
goproxy: https://proxy.golang.org
|
||||
import_path: github.com/nicholas-fedor/shoutrrr
|
32
.github/workflows/test.yaml
vendored
Normal file
32
.github/workflows/test.yaml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: Run tests and upload coverage
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run tests and collect coverage
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@29694d72cd5e7ef3b09496b39f28a942af47737e
|
||||
with:
|
||||
go-version: "1.24.3"
|
||||
|
||||
- name: Install dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
go test -v -coverprofile coverage.out -covermode atomic ./...
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue