Skip to content

bug: fix path readme for docker description #49

bug: fix path readme for docker description

bug: fix path readme for docker description #49

Workflow file for this run

name: Docker
on:
push:
branches:
- '**'
tags:
- 'v*'
paths:
- 'go.sum'
- 'go.mod'
- '**.go'
- .github/workflows/docker.yml
- Dockerfile
pull_request:
branches:
- master
paths:
- '**.go'
- 'go.sum'
- 'go.mod'
- Dockerfile
- .github/workflows/docker.yml
permissions:
actions: write
packages: write
id-token: write
attestations: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Docker:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
with:
username: cyb3rjak3
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: cyb3rjak3/cloudflare-exporter,ghcr.io/cyb3r-jak3/cloudflare-exporter
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
path: checkout
- name: Build
uses: docker/build-push-action@v6
id: build
with:
context: checkout
push: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/386
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
sbom: true
provenance: mode=max
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
with:
username: cyb3rjak3
password: ${{ secrets.DOCKER_PASSWORD }}
repository: cyb3rjak3/cloudflare-exporter
readme-filepath: checkout/README.md
- name: GitHub Container Attestation
uses: actions/attest-build-provenance@v1
id: attest
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
with:
subject-name: ghcr.io/cyb3r-jak3/cloudflare-exporter
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true