Skip to content

test

test #318

Workflow file for this run

name: OpenTelemtry Collector
on:
push:
branches: ["main"]
paths:
- otelcol/**
- .github/workflows/**
pull_request:
paths:
- otelcol/**
- .github/workflows/**
jobs:
docker:
if: false
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 # v3
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
- name: Login to ghcr.io
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
# id: cache
# with:
# path: |
# go-cache
# key: cache-otelcol-router-${{ hashFiles('otelcol/router/manifest.yaml') }}
# restore-keys: |
# cache-otelcol-router-
# - uses: reproducible-containers/buildkit-cache-dance@5b6db76d1da5c8b307d5d2e0706d266521b710de # v3
# with:
# cache-map: |
# {
# "go-cache": "/root/.cache/go-build"
# }
# skip-extraction: ${{steps.cache.outputs.cache-hit}}
- name: Docker meta
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
with:
images: |
ghcr.io/tosuke-homelab/otelcol
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@1ca370b3a9802c92e886402e0dd88098a2533b12 # v6
with:
push: true
context: "otelcol/router"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: |
linux/amd64
linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max