43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Build and push telegraf-snmp image
|
|
run-name: ${{ gitea.actor }} is building and pushing telegraf-snmp image
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'telegraf-snmp/**'
|
|
- '.gitea/workflows/telegraf-snmp.yaml'
|
|
|
|
env:
|
|
RESULT_IMAGE_NAME: tools/telegraf-snmp
|
|
|
|
jobs:
|
|
build-and-push-image:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Log in to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.PRIVATE_REGISTRY_DOMAIN }}
|
|
username: ${{ vars.PRIVATE_REGISTRY_USER }}
|
|
password: ${{ secrets.PRIVATE_REGISTRY_PASSWORD }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
buildkitd-config-inline: |
|
|
[registry."harbor.lan"]
|
|
insecure = true
|
|
|
|
- name: Build and push image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: telegraf-snmp
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: ${{ vars.PRIVATE_REGISTRY_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:latest
|