name: bcbio-docker-publish
on:
  push:
    branches:
      - master
    tags:
      - '*'
env:
  BCBIO_VERSION: 1.2.5
  BCBIO_REVISION: 69eea83
jobs:
  build-base:
    env:
      image_name: bcbio-base
      context: builds/base
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Login to Quay
        uses: docker/login-action@v1
        with:
          registry: quay.io
          username: ${{ secrets.REGISTRY_USERNAME }}
          password: ${{ secrets.REGISTRY_PASSWORD }}
      - name: Build and publish image to Quay
        uses: docker/build-push-action@v2
        with:
          context: .
          file: builds/base/Dockerfile
          push: true
          tags: |
            quay.io/bcbio/bcbio-base:${{ env.BCBIO_VERSION }}-${{ env.BCBIO_REVISION }}
            quay.io/bcbio/bcbio-base:latest

name: bcbio-docker-publish
on:
  push:
    branches:
      - master
    tags:
      - '*'
env:
  BCBIO_VERSION: 1.2.5
  BCBIO_REVISION: 69eea83
jobs:
  build-base:
    env:
      IMAGE_NAME: bcbio-base
      DOCKERFILE: builds/base/Dockerfile
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Login to Quay
        uses: docker/login-action@v1
        with:
          registry: quay.io
          username: ${{ secrets.REGISTRY_USERNAME }}
          password: ${{ secrets.REGISTRY_PASSWORD }}
      - name: Build and publish image to Quay
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ${{ jobs.env.DOCKERFILE }}
          push: true
          tags: |
            quay.io/bcbio/${{ jobs.env.IMAGE_NAME }}:${{ env.BCBIO_VERSION }}-${{ env.BCBIO_REVISION }}
            quay.io/bcbio/${{ jobs.env.IMAGE_NAME}}:latest

Move hardocded things to environment variables
Move hardocded things to environment variables
