removes 'v' from docker version tag #2
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 fruity-clickHouse image | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
name: Build and Push a new image version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout data repository | |
uses: actions/checkout@v4 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract tag version | |
id: vars | |
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- name: Build Docker image | |
run: | | |
docker build -t ghcr.io/datawheel/fruity-clickhouse:${{ env.VERSION }} . | |
docker tag ghcr.io/datawheel/fruity-clickhouse:${{ env.VERSION }} ghcr.io/datawheel/fruity-clickhouse:latest | |
- name: Push Docker image | |
run: | | |
docker push ghcr.io/datawheel/fruity-clickhouse:${{ env.VERSION }} | |
docker push ghcr.io/datawheel/fruity-clickhouse:latest |