Skip to content

build(deps): bump pymdown-extensions from 10.18 to 10.19.1 #124

build(deps): bump pymdown-extensions from 10.18 to 10.19.1

build(deps): bump pymdown-extensions from 10.18 to 10.19.1 #124

Workflow file for this run

name: Docker
on:
push:
branches: [ "main" ]
paths: ["Dockerfile", "start.sh", "requirements.txt"]
pull_request:
branches: [ "main" ]
paths: ["Dockerfile", "start.sh", "requirements.txt"]
env:
REGISTRY: docker.io
IMAGE_NAME: uvms/mkdocs-material
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Fetch all tags
run: git fetch --depth=1 --tags
# Install the cosign tool except on PR
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
with:
cosign-release: 'v2.4.1'
# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Get next Docker image version
id: get-next-version
run: |
echo "UVMS_IMAGE_VERSION=$(./getNextVersion.sh docker)" >> $GITHUB_ENV
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.UVMS_IMAGE_VERSION }}
type=raw,value=latest
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
- name: Tag
if: ${{ github.event_name != 'pull_request' }}
env:
VERSION: ${{ env.UVMS_IMAGE_VERSION }}
TAG: docker-image-${{ env.UVMS_IMAGE_VERSION }}
run: |
git config user.name uvmsci
git config user.email uvmsci@gmail.com
git tag -f -a "${TAG}" -m "build: release ${VERSION} of documentation image"
git push origin ${TAG}