Consolidated all post-fork updates including dependency bumps and workflow changes

This commit is contained in:
dependabot[bot] 2023-10-04 12:17:38 +02:00 committed by Nick Fedor
parent 2abaa47fd3
commit 6b62d53797
No known key found for this signature in database
GPG key ID: A167CBEDE64D29CB
100 changed files with 1503 additions and 1264 deletions

16
.github/CODEOWNERS vendored
View file

@ -1,8 +1,8 @@
pkg/notifications/smtp.go @piksel
pkg/notifications/email.go @piksel
pkg/notifications/shoutrrr.go @piksel @simskij @arnested
pkg/container/* @simskij
pkg/api/* @victorcmoura
.devbots/* @simskij
.github/* @simskij
docs/* @containrrr/watchtower-contributors
pkg/notifications/smtp.go @nicholas-fedor
pkg/notifications/email.go @nicholas-fedor
pkg/notifications/shoutrrr.go @nicholas-fedor
pkg/container/* @nicholas-fedor
pkg/api/* @nicholas-fedor
.devbots/* @nicholas-fedor
.github/* @nicholas-fedor
docs/* @nicholas-fedor/watchtower-contributors

View file

@ -5,7 +5,7 @@ labels: ["Priority: Medium, Status: Available, Type: Bug"]
body:
- type: markdown
attributes:
value: Before submitting your issue, please make sure you're using the containrrr/watchtower:latest image. If not, switch to this image prior to posting your report. Other forks, or the old `v2tec` image are **not** supported.
value: Before submitting your issue, please make sure you're using the nickfedor/watchtower:latest image. If not, switch to this image prior to posting your report. Other forks, or the old `v2tec` image are **not** supported.
- type: textarea
id: description

View file

@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/containrrr/watchtower/discussions
url: https://github.com/nicholas-fedor/watchtower/discussions
about: Ask questions and discuss with other community members

207
.github/renovate.json5 vendored Normal file
View file

@ -0,0 +1,207 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
'docker:enableMajor',
':disableRateLimiting',
':dependencyDashboard',
':semanticCommits',
':automergeBranch',
],
dependencyDashboard: true,
dependencyDashboardTitle: 'Renovate Dashboard 🤖',
suppressNotifications: [
'prEditedNotification',
'prIgnoreNotification',
],
rebaseWhen: 'conflicted',
schedule: [
'every weekend',
],
commitMessageTopic: '{{depName}}',
commitMessageExtra: 'to {{newVersion}}',
commitMessageSuffix: '',
packageRules: [
{
description: [
'Auto merge Github Actions',
],
matchManagers: [
'github-actions',
],
automerge: true,
automergeType: 'branch',
ignoreTests: true,
matchUpdateTypes: [
'minor',
'patch',
],
},
{
matchDatasources: [
'docker',
],
commitMessageTopic: 'image {{depName}}',
},
{
matchDatasources: [
'docker',
],
matchUpdateTypes: [
'major',
],
commitMessagePrefix: 'feat(container)!: ',
},
{
matchDatasources: [
'docker',
],
matchUpdateTypes: [
'minor',
],
semanticCommitType: 'feat',
semanticCommitScope: 'container',
},
{
matchDatasources: [
'docker',
],
matchUpdateTypes: [
'patch',
],
semanticCommitType: 'fix',
semanticCommitScope: 'container',
},
{
matchDatasources: [
'docker',
],
matchUpdateTypes: [
'digest',
],
semanticCommitType: 'chore',
semanticCommitScope: 'container',
},
{
matchDatasources: [
'github-releases',
'github-tags',
],
matchUpdateTypes: [
'major',
],
commitMessagePrefix: 'feat(github-release)!: ',
},
{
matchDatasources: [
'github-releases',
'github-tags',
],
matchUpdateTypes: [
'minor',
],
semanticCommitType: 'feat',
semanticCommitScope: 'github-release',
},
{
matchDatasources: [
'github-releases',
'github-tags',
],
matchUpdateTypes: [
'patch',
],
semanticCommitType: 'fix',
semanticCommitScope: 'github-release',
},
{
matchManagers: [
'github-actions',
],
matchUpdateTypes: [
'major',
],
commitMessagePrefix: 'feat(github-action)!: ',
},
{
matchManagers: [
'github-actions',
],
matchUpdateTypes: [
'minor',
],
semanticCommitType: 'feat',
semanticCommitScope: 'github-action',
},
{
matchManagers: [
'github-actions',
],
matchUpdateTypes: [
'patch',
],
semanticCommitType: 'fix',
semanticCommitScope: 'github-action',
},
{
matchUpdateTypes: [
'major',
],
labels: [
'type/major',
],
},
{
matchUpdateTypes: [
'minor',
],
labels: [
'type/minor',
],
},
{
matchUpdateTypes: [
'patch',
],
labels: [
'type/patch',
],
},
{
matchDatasources: [
'docker',
],
addLabels: [
'renovate/container',
],
},
{
matchDatasources: [
'github-releases',
'github-tags',
],
addLabels: [
'renovate/github-release',
],
},
{
matchManagers: [
'github-actions',
],
addLabels: [
'renovate/github-action',
],
},
],
customManagers: [
{
customType: "regex",
description: ["Process custom Docker dependencies"],
fileMatch: ["^Dockerfile$"], // Match only Dockerfile for Watchtower
matchStrings: [
"FROM (?<depName>[^\\s]+)(?<currentValue>:[^\\s]+)?\\s*", // Simplified for Docker images
],
datasourceTemplate: "docker",
},
],
}

View file

@ -44,7 +44,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@ -69,4 +69,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View file

@ -9,4 +9,4 @@ jobs:
pull-requests: write
if: github.actor == 'dependabot[bot]'
steps:
- uses: hmarr/auto-approve-action@v3
- uses: hmarr/auto-approve-action@v4

View file

@ -1,7 +1,7 @@
name: Greetings
on:
# Runs in the context of the target (containrrr/watchtower) repository, and as such has access to GITHUB_TOKEN
# Runs in the context of the target (nicholas-fedor/watchtower) repository, and as such has access to GITHUB_TOKEN
pull_request_target:
types: [opened]
issues:
@ -16,8 +16,8 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: >
Hi there! 👋🏼
As you're new to this repo, we'd like to suggest that you read our [code of conduct](https://github.com/containrrr/.github/blob/master/CODE_OF_CONDUCT.md)
as well as our [contribution guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md).
As you're new to this repo, we'd like to suggest that you read our [code of conduct](https://github.com/nicholas-fedor/.github/blob/master/CODE_OF_CONDUCT.md)
as well as our [contribution guidelines](https://github.com/nicholas-fedor/watchtower/blob/master/CONTRIBUTING.md).
Thanks a bunch for opening your first issue! 🙏
pr-message: >
Congratulations on opening your first pull request! We'll get back to you as soon as possible. In the meantime, please make sure you've updated the documentation to reflect your changes and have added test automation as needed. Thanks! 🙏🏼

View file

@ -18,13 +18,13 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.23.x
- name: Build tplprev
run: scripts/build-tplprev.sh
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'

View file

@ -6,6 +6,9 @@ on:
branches:
- main
permissions:
contents: read
jobs:
lint:
name: Lint
@ -16,12 +19,12 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.18.x
- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc #v1.3.0
go-version: 1.23.x
- uses: dominikh/staticcheck-action@v1.3.1
with:
version: "2022.1.1"
# version: "2024.1.1"
install-go: "false" # StaticCheck uses go v1.17 which does not support `any`
test:
name: Test
@ -29,7 +32,7 @@ jobs:
fail-fast: false
matrix:
go-version:
- 1.18.x
- 1.23.x
platform:
- macos-latest
- windows-latest
@ -41,16 +44,16 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.23.x
- name: Run tests
run: |
go test -v -coverprofile coverage.out -covermode atomic ./...
- name: Publish coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Publish coverage
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
build:
name: Build
runs-on: ubuntu-latest
@ -60,11 +63,11 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.23.x
- name: Build
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v3
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6
with:
version: v0.155.0
version: '~> v2'
args: --snapshot --skip-publish --debug

View file

@ -11,10 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Build
run: ./build.sh
test:
@ -22,13 +24,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23.x
- name: Test
run: go test -v -coverprofile coverage.out -covermode atomic ./...
run: go test -v -coverprofile coverage.out -covermode atomic ./...
- name: Publish coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
publish:
@ -44,7 +46,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
file: dockerfiles/Dockerfile.self-contained
repository: containrrr/watchtower
repository: nickfedor/watchtower
tags: latest-dev
- name: Publish to GHCR
uses: jerray/publish-docker-action@87d84711629b0dc9f6bb127b568413cc92a2088e #master@2022-10-14
@ -53,5 +55,5 @@ jobs:
password: ${{ secrets.BOT_GHCR_PAT }}
file: dockerfiles/Dockerfile.self-contained
registry: ghcr.io
repository: containrrr/watchtower
repository: nicholas-fedor/watchtower
tags: latest-dev

View file

@ -2,37 +2,31 @@ name: Release (Production)
on:
workflow_dispatch: {}
release:
types:
- created
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '**/v[0-9]+.[0-9]+.[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"
- "**/v[0-9]+.[0-9]+.[0-9]+"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
go-version: 1.18.x
- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc #v1.3.0
with:
version: "2022.1.1"
install-go: "false" # StaticCheck uses go v1.17 which does not support `any`
version: v1.60
test:
name: Test
strategy:
matrix:
go-version:
- 1.18.x
- 1.23.x
platform:
- ubuntu-latest
- macos-latest
@ -44,9 +38,9 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.23.x
- name: Run tests
run: |
go test ./... -coverprofile coverage.out
@ -54,146 +48,154 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
needs:
permissions:
packages: write
contents: read
attestations: write
id-token: write
needs:
- test
- lint
env:
CGO_ENABLED: 0
TAG: ${{ github.event.release.tag_name }}
TAG: ${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.23.x
- name: Login to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc #v2
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc #v2
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3
with:
username: ${{ secrets.BOT_USERNAME }}
password: ${{ secrets.BOT_GHCR_PAT }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 #v3
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1
with:
version: v0.155.0
args: --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GHCR_PAT }}
- name: Enable experimental docker features
run: |
mkdir -p ~/.docker/ && \
echo '{"experimental": "enabled"}' > ~/.docker/config.json
- name: Create manifest for version
run: |
export DH_TAG=$(echo $TAG | sed 's/^v*//')
docker manifest create \
containrrr/watchtower:$DH_TAG \
containrrr/watchtower:amd64-$DH_TAG \
containrrr/watchtower:i386-$DH_TAG \
containrrr/watchtower:armhf-$DH_TAG \
containrrr/watchtower:arm64v8-$DH_TAG
docker manifest create \
ghcr.io/containrrr/watchtower:$DH_TAG \
ghcr.io/containrrr/watchtower:amd64-$DH_TAG \
ghcr.io/containrrr/watchtower:i386-$DH_TAG \
ghcr.io/containrrr/watchtower:armhf-$DH_TAG \
ghcr.io/containrrr/watchtower:arm64v8-$DH_TAG
- name: Annotate manifest for version
run: |
for REPO in '' ghcr.io/ ; do
docker manifest annotate \
${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \
${REPO}containrrr/watchtower:i386-$(echo $TAG | sed 's/^v*//') \
--os linux \
--arch 386
docker manifest annotate \
${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \
${REPO}containrrr/watchtower:armhf-$(echo $TAG | sed 's/^v*//') \
--os linux \
--arch arm
docker manifest annotate \
${REPO}containrrr/watchtower:$(echo $TAG | sed 's/^v*//') \
${REPO}containrrr/watchtower:arm64v8-$(echo $TAG | sed 's/^v*//') \
--os linux \
--arch arm64 \
--variant v8
done
- name: Create manifest for latest
run: |
docker manifest create \
containrrr/watchtower:latest \
containrrr/watchtower:amd64-latest \
containrrr/watchtower:i386-latest \
containrrr/watchtower:armhf-latest \
containrrr/watchtower:arm64v8-latest
docker manifest create \
ghcr.io/containrrr/watchtower:latest \
ghcr.io/containrrr/watchtower:amd64-latest \
ghcr.io/containrrr/watchtower:i386-latest \
ghcr.io/containrrr/watchtower:armhf-latest \
ghcr.io/containrrr/watchtower:arm64v8-latest
- name: Annotate manifest for latest
run: |
for REPO in '' ghcr.io/ ; do
docker manifest annotate \
${REPO}containrrr/watchtower:latest \
${REPO}containrrr/watchtower:i386-latest \
--os linux \
--arch 386
docker manifest annotate \
${REPO}containrrr/watchtower:latest \
${REPO}containrrr/watchtower:armhf-latest \
--os linux \
--arch arm
docker manifest annotate \
${REPO}containrrr/watchtower:latest \
${REPO}containrrr/watchtower:arm64v8-latest \
--os linux \
--arch arm64 \
--variant v8
- name: Create GHCR manifests for version and latest and push to GHCR
env:
GHCR_USER: ${{ secrets.BOT_USERNAME }}
GHCR_TOKEN: ${{ secrets.BOT_GHCR_PAT }}
run: |
echo $GHCR_TOKEN | docker login ghcr.io -u $GHCR_USER --password-stdin && \
export DH_TAG=$(git tag --points-at HEAD | sed 's/^v*//') && \
done
- name: Push manifests to Dockerhub
# Create latest manifest
docker manifest create \
ghcr.io/nicholas-fedor/watchtower:latest \
ghcr.io/nicholas-fedor/watchtower:amd64-latest \
ghcr.io/nicholas-fedor/watchtower:i386-latest \
ghcr.io/nicholas-fedor/watchtower:armhf-latest \
ghcr.io/nicholas-fedor/watchtower:arm64v8-latest
# Create versioned manifest
docker manifest create \
ghcr.io/nicholas-fedor/watchtower:$DH_TAG \
ghcr.io/nicholas-fedor/watchtower:amd64-$DH_TAG \
ghcr.io/nicholas-fedor/watchtower:i386-$DH_TAG \
ghcr.io/nicholas-fedor/watchtower:armhf-$DH_TAG \
ghcr.io/nicholas-fedor/watchtower:arm64v8-$DH_TAG
# Latest manifest annotation
# for REPO in '' ghcr.io/ ; do
# docker manifest annotate \
# ${REPO}nicholas-fedor/watchtower:latest \
# ${REPO}nicholas-fedor/watchtower:i386-latest \
# --os linux \
# --arch 386
# docker manifest annotate \
# ${REPO}nicholas-fedor/watchtower:latest \
# ${REPO}nicholas-fedor/watchtower:armhf-latest \
# --os linux \
# --arch arm
# docker manifest annotate \
# ${REPO}nicholas-fedor/watchtower:latest \
# ${REPO}nicholas-fedor/watchtower:arm64v8-latest \
# --os linux \
# --arch arm64 \
# --variant v8
# done
# Versioned manifest annotation
# for REPO in '' ghcr.io/ ; do
# docker manifest annotate \
# ${REPO}nicholas-fedor/watchtower:$(echo $TAG | sed 's/^v*//') \
# ${REPO}nicholas-fedor/watchtower:i386-$(echo $TAG | sed 's/^v*//') \
# --os linux \
# --arch 386
# docker manifest annotate \
# ${REPO}nicholas-fedor/watchtower:$(echo $TAG | sed 's/^v*//') \
# ${REPO}nicholas-fedor/watchtower:armhf-$(echo $TAG | sed 's/^v*//') \
# --os linux \
# --arch arm
# docker manifest annotate \
# ${REPO}nicholas-fedor/watchtower:$(echo $TAG | sed 's/^v*//') \
# ${REPO}nicholas-fedor/watchtower:arm64v8-$(echo $TAG | sed 's/^v*//') \
# --os linux \
# --arch arm64 \
# --variant v8
# done
# Push manifests to GHCR
docker manifest push ghcr.io/nicholas-fedor/watchtower:latest
docker manifest push ghcr.io/nicholas-fedor/watchtower:$(echo $TAG | sed 's/^v*//')
- name: Create Docker Hub manifests for version and latest and push to Docker Hub
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
docker login -u $DOCKER_USER -p $DOCKER_TOKEN && \
docker manifest push containrrr/watchtower:$(echo $TAG | sed 's/^v*//') && \
docker manifest push containrrr/watchtower:latest
- name: Push manifests to GitHub Container Registry
env:
DOCKER_USER: ${{ secrets.BOT_USERNAME }}
DOCKER_TOKEN: ${{ secrets.BOT_GHCR_PAT }}
run: |
docker login -u $DOCKER_USER -p $DOCKER_TOKEN ghcr.io && \
docker manifest push ghcr.io/containrrr/watchtower:$(echo $TAG | sed 's/^v*//') && \
docker manifest push ghcr.io/containrrr/watchtower:latest
echo $DOCKER_TOKEN | docker login -u $DOCKER_USER --password-stdin && \
export DH_TAG=$(git tag --points-at HEAD | sed 's/^v*//') && \
renew-docs:
name: Refresh pkg.go.dev
needs: build
runs-on: ubuntu-latest
steps:
- name: Pull new module version
uses: andrewslotin/go-proxy-pull-action@50fea06a976087614babb9508e5c528b464f4645 #master@2022-10-14
# Create latest manifest
docker manifest create \
nickfedor/watchtower:latest \
nickfedor/watchtower:amd64-latest \
nickfedor/watchtower:i386-latest \
nickfedor/watchtower:armhf-latest \
nickfedor/watchtower:arm64v8-latest
# Create versioned manifest
docker manifest create \
nickfedor/watchtower:$DH_TAG \
nickfedor/watchtower:amd64-$DH_TAG \
nickfedor/watchtower:i386-$DH_TAG \
nickfedor/watchtower:armhf-$DH_TAG \
nickfedor/watchtower:arm64v8-$DH_TAG
# Push manifests to Docker Hub
docker manifest push nickfedor/watchtower:latest
docker manifest push nickfedor/watchtower:$(echo $TAG | sed 's/^v*//')