Compare commits
5 Commits
8314be44e3
...
22d0598146
Author | SHA1 | Date | |
---|---|---|---|
22d0598146 | |||
a771afac2c | |||
b2c80a3cd7 | |||
ad11523d7d | |||
c1121344be |
74
.gitea/workflows/build-main.yaml
Normal file
74
.gitea/workflows/build-main.yaml
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
name: Build Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
|
||||||
|
env:
|
||||||
|
TEST_TAG: mrmeeb/snmptrap:test
|
||||||
|
FULL_TAG: git.mrmeeb.stream/mrmeeb/snmptrap:latest
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
"Validate Image":
|
||||||
|
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||||
|
steps:
|
||||||
|
- name: Build locally
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
load: true
|
||||||
|
tags: ${{ env.TEST_TAG }}
|
||||||
|
provenance: false
|
||||||
|
- name: Test Failure
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
severity: error
|
||||||
|
details: Test Failed!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
username: Gitea
|
||||||
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||||
|
|
||||||
|
"Publish Image":
|
||||||
|
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||||
|
needs: ["Validate Image"]
|
||||||
|
steps:
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Login to Gitea Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.mrmeeb.stream
|
||||||
|
username: ${{ env.GITHUB_ACTOR }}
|
||||||
|
password: ${{ secrets.GTCR_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ env.FULL_TAG }}
|
||||||
|
provenance: false
|
||||||
|
- name: Build Failure
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
severity: error
|
||||||
|
details: Build Failed!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
username: Gitea
|
||||||
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||||
|
|
||||||
|
"Notify":
|
||||||
|
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||||
|
needs: ["Validate Image", "Publish Image"]
|
||||||
|
steps:
|
||||||
|
- name: Notify of success
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
severity: info
|
||||||
|
details: Build succeeded!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
username: Gitea
|
||||||
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
80
.gitea/workflows/build-tagged-release.yaml
Normal file
80
.gitea/workflows/build-tagged-release.yaml
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
name: Build Tagged Release Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
FULL_TAG: git.mrmeeb.stream/mrmeeb/snmptrap
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
"Build Image":
|
||||||
|
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||||
|
steps:
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Login to Gitea Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.mrmeeb.stream
|
||||||
|
username: ${{ env.GITHUB_ACTOR }}
|
||||||
|
password: ${{ secrets.GTCR_TOKEN }}
|
||||||
|
- name: Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.FULL_TAG }}
|
||||||
|
tags: |
|
||||||
|
type=pep440,pattern={{version}}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
provenance: false
|
||||||
|
- name: Notify on failure
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
severity: error
|
||||||
|
details: Build failed!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
username: Gitea
|
||||||
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||||
|
"Create Release":
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: ["Build Image"]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: 1.22.2
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v5
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: latest
|
||||||
|
args: release --clean -f .goreleaser-gitea.yaml
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
|
||||||
|
|
||||||
|
"Notify":
|
||||||
|
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||||
|
needs: ["Build Image", "Create Release"]
|
||||||
|
steps:
|
||||||
|
- name: Notify of success
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
severity: info
|
||||||
|
details: Build succeeded!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
username: Gitea
|
||||||
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
47
.gitea/workflows/test-pr.yaml
Normal file
47
.gitea/workflows/test-pr.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: Test Pull Request
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'develop'
|
||||||
|
|
||||||
|
env:
|
||||||
|
FULL_TAG: git.mrmeeb.stream/mrmeeb/snmptrap:develop
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
"Build Image":
|
||||||
|
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||||
|
steps:
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Build
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: false
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ env.FULL_TAG }}
|
||||||
|
provenance: false
|
||||||
|
- name: Notify on failure
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
severity: error
|
||||||
|
details: Build failed!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
username: Gitea
|
||||||
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
||||||
|
"Notify":
|
||||||
|
runs-on: [ubuntu-docker-latest, linux/amd64]
|
||||||
|
needs: ["Build Image"]
|
||||||
|
steps:
|
||||||
|
- name: Notify of success
|
||||||
|
uses: rjstone/discord-webhook-notify@v1
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
severity: info
|
||||||
|
details: Build succeeded!
|
||||||
|
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
username: Gitea
|
||||||
|
avatarUrl: ${{ vars.RUNNER_ICON_URL }}
|
@ -1,9 +1,7 @@
|
|||||||
FROM alpine:3.8
|
FROM alpine:3.21
|
||||||
MAINTAINER David Chidell (dchidell@cisco.com)
|
|
||||||
|
|
||||||
RUN apk --no-cache add net-snmp
|
RUN apk --no-cache add net-snmp
|
||||||
ADD mibs.tar.gz /mibs/
|
ADD mibs.tar.gz /mibs/
|
||||||
ADD snmptrapd.conf /etc/snmp/snmptrapd.conf
|
ADD snmptrapd.conf /etc/snmp/snmptrapd.conf
|
||||||
EXPOSE 162/tcp
|
|
||||||
EXPOSE 162/udp
|
EXPOSE 162/udp
|
||||||
CMD ["snmptrapd","-n","-L","o","-f","-M","/mibs","-m","ALL"]
|
CMD ["snmptrapd","-n","-L","o","-f","-M","/mibs","-m","ALL"]
|
||||||
|
34
goreleaser-gitea.yaml
Normal file
34
goreleaser-gitea.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
dist: dist-gitea
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- skip: true
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- format: binary
|
||||||
|
|
||||||
|
release:
|
||||||
|
draft: true
|
||||||
|
|
||||||
|
header: |
|
||||||
|
# Docker SNMP Trap v{{ .Tag }}
|
||||||
|
|
||||||
|
## Docker Image:
|
||||||
|
`git.mrmeeb.stream/mrmeeb/docker-snmptrap:{{ .Tag }}`
|
||||||
|
|
||||||
|
gitea:
|
||||||
|
owner: MrMeeb
|
||||||
|
name: snmptrap
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- '^docs:'
|
||||||
|
- '^test:'
|
||||||
|
|
||||||
|
# .goreleaser.yaml
|
||||||
|
gitea_urls:
|
||||||
|
api: https://git.mrmeeb.stream/api/v1
|
||||||
|
download: https://git.mrmeeb.stream
|
||||||
|
# set to true if you use a self-signed certificate
|
||||||
|
skip_tls_verify: false
|
8
renovate.json
Normal file
8
renovate.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
"extends": [":automergeMinor", ":automergePr", ":automergeRequireAllStatusChecks", ":dependencyDashboard", ":disableRateLimiting", ":rebaseStalePrs"],
|
||||||
|
"major": {
|
||||||
|
"dependencyDashboardApproval": true
|
||||||
|
},
|
||||||
|
"minimumReleaseAge": "7 days"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user