Skip to content

only push to docker on version tags #3

only push to docker on version tags

only push to docker on version tags #3

Workflow file for this run

name: Docker image
on:
push:
branches:
- 'main'
tags:
- 'v*' # version tags
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v4
with:
submodules: true
- run: df -h /
- run: sudo rm -rf \
"$AGENT_TOOLSDIRECTORY" \
/opt/google/chrome \
/opt/microsoft/msedge \
/opt/microsoft/powershell \
/opt/pipx \
/usr/lib/mono \
/usr/local/julia* \
/usr/local/lib/android \
/usr/local/lib/node_modules \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/dotnet \
/usr/share/swift
- run: df -h /
- run: ./docker/build.sh
- run: ./docker/push.sh ${{ secrets.DOCKERHUB_USERNAME }}/llgtrt
if: startsWith(github.ref, 'refs/tags/v')