Skip to content

Build and Push Docker Image of operator #6

Build and Push Docker Image of operator

Build and Push Docker Image of operator #6

Workflow file for this run

name: Build and Push Docker Image of operator
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Create Docker config with auth
run: |
mkdir -p ~/.docker
echo '${{ secrets.DOCKER_AUTH_CONFIG }}' > ~/.docker/config.json
- name: Extract Tag Name
run: |
TAG=$(echo "${GITHUB_REF#refs/tags/tarantool-operator-}")
echo "TAG=$VERSION" >> $GITHUB_ENV
- name: Push docker
run: |
docker build -t docker-picodata.binary.picodata.io/tarantool-operator:${{ env.TAG }} .
docker --config ~/.docker/ push docker-picodata.binary.picodata.io/tarantool-operator:${{ env.TAG }}
docker build -t docker-picodata.binary.picodata.io/tarantool-operator:latest .
docker --config ~/.docker/ push docker-picodata.binary.picodata.io/tarantool-operator:latest
- name: Delete docker auth config
run: rm -rf ~/.docker/config.json # Clean up Docker auth credentials