Skip to content

Pushing on tags only #47

Pushing on tags only

Pushing on tags only #47

Workflow file for this run

name: Docker Build
on:
push:
branches:
- "**"
tags:
- "v*"
env:
DOCKER_TAG_LATEST: rsamf/graphbook:latest
DOCKER_TAG: rsamf/graphbook:${{ github.ref_name }}
jobs:
base:
runs-on:
group: larger-runners
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
file: ./docker/Dockerfile
tags: |
$DOCKER_TAG_LATEST
$DOCKER_TAG
cache-from: type=registry,ref=$DOCKER_TAG_LATEST
cache-to: type=inline
hfspace:
needs: base
runs-on:
group: larger-runners
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
file: ./docker/Dockerfile.hfspace
tags: ${DOCKER_TAG}-space
cache-from: type=registry,ref=${DOCKER_TAG}-space
cache-to: type=inline