Skip to content

feat(pp): log redaction #2649

feat(pp): log redaction

feat(pp): log redaction #2649

Workflow file for this run

name: Docker
on:
push:
branches:
- main
pull_request:
release:
types: [published]
env:
platforms: "linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/riscv64,linux/s390x"
permissions:
contents: read
jobs:
build:
strategy:
matrix:
nocapdrop: [false, true]
name: ${{ matrix.nocapdrop && 'Build (nocapdrop)' || 'Build' }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-build-${{ github.ref }}-${{ matrix.nocapdrop }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
steps:
- name: 🛡️ Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
disable-sudo: true
policy: build
- name: 🚚 Check out the repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- name: 🤖 Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: 🏗️ Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
with:
version: latest
- name: 🔑 Log in to Docker
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🏷️ Fetch git tags for `git describe`
run: "git fetch --force --prune --unshallow --tags"
- name: 📝 Run `git describe` and save its output
run: echo 'GIT_DESCRIBE='`git describe --tags --always --long` >> $GITHUB_OUTPUT
id: git-describe
- name: 📝 Calculate metadata for minimal Docker images
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
id: meta
with:
images: ${{ github.repository }}
tags: |
type=edge,suffix=${{ matrix.nocapdrop && '-nocapdrop' || '' }}
type=semver,pattern={{version}},suffix=${{ matrix.nocapdrop && '-nocapdrop' || '' }}
type=semver,pattern={{major}},suffix=${{ matrix.nocapdrop && '-nocapdrop' || '' }}
annotations: |
io.artifacthub.package.license=Apache-2.0
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/favonia/cloudflare-ddns/main/build/SUMMARY.markdown
io.artifacthub.package.maintainers=[{"name":"favonia","email":"[email protected]"}]
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: index
- name: 🚀 Build and deploy minimal Docker images
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
id: build
with:
target: "minimal"
push: ${{ github.event_name != 'pull_request' }}
build-args: |
${{ format('GIT_DESCRIBE={0}', steps.git-describe.outputs.GIT_DESCRIBE) }}
${{ matrix.nocapdrop && 'EXTRA_BUILD_TAGS=nocapdrop' || '' }}
platforms: ${{ env.platforms }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
provenance: "mode=max"
- name: ✍️ Install Cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # 3.5.0
- name: ✍️ Sign the Docker images
if: ${{ github.event_name != 'pull_request' }}
run: |
cosign sign --recursive --yes "favonia/cloudflare-ddns@${{ steps.build.outputs.digest }}"