Skip to content

docker: moves everything to consistent docker base layer (#3613) #9

docker: moves everything to consistent docker base layer (#3613)

docker: moves everything to consistent docker base layer (#3613) #9

Workflow file for this run

# yamllint --format github .github/workflows/docker_push.yml
---
name: docker_push
# We re-push docker images on a trigger tag, regardless of if the commit is documentation-only.
#
# See https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
on:
push:
tags: 'docker-[0-9]+.[0-9]+.[0-9]+**' # Ex. docker-1.2.3
jobs:
docker_push:
runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # only needed to get the sha label
# We can't cache Docker without using buildx because GH actions restricts /var/lib/docker
# That's ok because DOCKER_PARENT_IMAGE is always ghcr.io and local anyway.
- name: Docker Push
run: | # GITHUB_REF will be refs/tags/docker-MAJOR.MINOR.PATCH
build-bin/git/login_git &&
build-bin/docker/configure_docker_push &&
build-bin/docker_push $(echo ${GITHUB_REF} | cut -d/ -f 3)
env:
# GH_USER=<user that created GH_TOKEN>
GH_USER: ${{ secrets.GH_USER }}
# GH_TOKEN=<hex token value>
# - pushes Docker images to ghcr.io
# - create via https://github.com/settings/tokens
# - needs repo:status, public_repo, write:packages, delete:packages
GH_TOKEN: ${{ secrets.GH_TOKEN }}
# DOCKERHUB_USER=<typically dockerzipkindeployer>
# - only push top-level projects: zipkin zipkin-aws zipkin-dependencies zipkin-gcp to Docker Hub, only on release
# - login like this: echo "$DOCKERHUB_TOKEN"| docker login -u "$DOCKERHUB_USER" --password-stdin
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
# DOCKERHUB_TOKEN=<access token for DOCKERHUB_USER>
# - Access Token from here https://hub.docker.com/settings/security
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}