Skip to content

docker_build

docker_build #7

Workflow file for this run

name: docker_build
on:
workflow_run:
workflows: ["release"]
types:
- completed
jobs:
docker_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set env VERSION
run: |
git fetch --tags
echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: build/
build-args: |
VERSION=${{ env.VERSION }}
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/gtt:${{ env.VERSION }}
${{ secrets.DOCKERHUB_USERNAME }}/gtt:latest