Skip to content

build(deps): bump go.opentelemetry.io/otel/sdk/log from 0.20.0 to 0.21.0 #456

build(deps): bump go.opentelemetry.io/otel/sdk/log from 0.20.0 to 0.21.0

build(deps): bump go.opentelemetry.io/otel/sdk/log from 0.20.0 to 0.21.0 #456

Workflow file for this run

name: Build Docker images
on:
push:
branches:
- "**"
tags:
- "v*"
pull_request:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
digest: ${{ steps.build.outputs.digest }}
steps:
- name: Checkout the repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
# Only run if it is for a tag, else it exposes credentials for no reason (we don't push)
- name: Login to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
with:
images: ctferio/ctfd-setup
- name: Git commit date
id: infos
run: |
# trim version prefix
version=${{ github.ref_name }}
version="${version#"v"}"
echo "version=$version" >> "$GITHUB_OUTPUT"
# output date per RFC 3339
date="$(git log -1 --format=%cd --date=format:%Y-%m-%dT%H:%M:%SZ)"
echo "date=$date" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
id: build
with:
push: ${{ startsWith(github.ref, 'refs/tags/') }}
sbom: ${{ startsWith(github.ref, 'refs/tags/') }} # may not produce SBOM in manifest if the image has no filesystem (e.g. "FROM scratch")
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ steps.infos.outputs.version }}
COMMIT=${{ github.sha }}
DATE=${{ steps.infos.outputs.date }}
# This step calls the container workflow to generate provenance and push it to
# the container registry.
provenance:
needs: [docker]
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading attestations.
if: startsWith(github.ref, 'refs/tags/')
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0
with:
image: ctferio/ctfd-setup
digest: ${{ needs.docker.outputs.digest }}
secrets:
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}