fix: add port ID to labels #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build SNMP Exporter | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: read | |
packages: write | |
actions: write | |
concurrency: | |
group: snmp_exporter-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
REGISTRY_IMAGE: ghcr.io/iaa-inc/snmp_exporter | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate Token | |
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a | |
id: generate-token | |
with: | |
app_id: ${{ secrets.BOT_APP_ID }} | |
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
cache: true | |
- name: Configure git for private modules | |
env: | |
TOKEN: "${{ steps.generate-token.outputs.token }}" | |
run: git config --global url."https://iaa-inc:${TOKEN}@github.com".insteadOf "https://github.com" | |
- name: Extract metadata for the Docker image | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY_IMAGE }} | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" |