Make stable docker tag #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Make stable docker tag | |
on: | |
workflow_dispatch: | |
inputs: | |
docker_tag: | |
description: 'Docker release tag' | |
required: true | |
jobs: | |
docker-tag-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Pull clickhouse-backup image | |
run: docker pull altinity/clickhouse-backup:${{ github.event.inputs.docker_tag }} | |
- name: Tag clickhouse-backup image as stable and push | |
env: | |
DOCKER_REPO: ${{ secrets.DOCKER_REPO }} | |
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }} | |
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} | |
run: | | |
docker tag ${DOCKER_REGISTRY:-docker.io}/${DOCKER_REPO}/${DOCKER_IMAGE}:${{ github.event.inputs.docker_tag }} ${DOCKER_REGISTRY:-docker.io}/${DOCKER_REPO}/${DOCKER_IMAGE}:stable | |
docker image ls | grep stable | |
docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:stable |