Bump version to update base image #24
Workflow file for this run
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: Build and Push on Tag | |
# This workflow is triggered on new tag pushed to the repository. | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
publish-builder: | |
name: Publish Builder | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu18.04] | |
env: | |
OS_NAME: ${{ matrix.os }} | |
REGISTRY_NAME: milvusdb/etcd | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get version from system time after release step | |
id: extracter | |
run: | | |
echo "::set-output name=git_tag::$(echo "${{ github.ref }}" | awk -F '/' '{print $3}')" | |
- name: Build Docker Image | |
shell: bash | |
run: | | |
IMAGE_TAG=${{ steps.extracter.outputs.git_tag }} | |
echo "Start Building ${REGISTRY_NAME}:${IMAGE_TAG}" | |
docker build -t ${REGISTRY_NAME}:${IMAGE_TAG} 3.5/debian-11 | |
docker tag ${REGISTRY_NAME}:${IMAGE_TAG} ${REGISTRY_NAME}:latest | |
- name: Push Docker Image | |
shell: bash | |
run: | | |
IMAGE_TAG=${{ steps.extracter.outputs.git_tag }} | |
docker login -u ${{ secrets.DOCKER_USERNAME }} \ | |
-p ${{ secrets.DOCKER_PWD }} | |
docker push ${REGISTRY_NAME}:${IMAGE_TAG} | |
docker push ${REGISTRY_NAME}:latest |