Skip to content
# This is a basic workflow to help you get started with Actions
name: Push condor on commits without tag
# Push to docker hub if tag has been created.
on:
push:
branches:
- '*'
paths-ignore:
- 'helm/*'
- 'docs/*'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-dockers:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set Env
run: |
echo "KANIKO_CACHE_REGISTRY=aquaveollc/condor-cache" >> $GITHUB_ENV
echo "KANIKO_IMAGE_BASE=aquaveollc/condor-base" >> $GITHUB_ENV
echo "KANIKO_IMAGE_COLLECTOR=aquaveollc/condor-collector" >> $GITHUB_ENV
echo "KANIKO_IMAGE_SCHEDULER=aquaveollc/condor-scheduler" >> $GITHUB_ENV
echo "KANIKO_IMAGE_STANDALONE=aquaveollc/condor-standalone" >> $GITHUB_ENV
echo "KANIKO_IMAGE_WORKER=aquaveollc/condor-worker" >> $GITHUB_ENV
- name: Set Tag
run: |
echo "TAG=dev-${GITHUB_SHA}" >> $GITHUB_ENV
# If the branch is stable, we'll overwrite the TAG to include stable.
- name: Set Stable Tag
if: endsWith(github.ref, '/stable')
run: |
echo "TAG=stable" >> $GITHUB_ENV
- name: Test Tag
run: |
echo $TAG
- name: build and push tag for docker base
uses: aevea/[email protected]
with:
# Docker registry where the image will be pushed
registry: docker.io
# Username used for authentication to the Docker registry
username: ${{ secrets.DOCKER_BUILDER_USERNAME }}
# Password used for authentication to the Docker registry
password: ${{ secrets.DOCKER_BUILDER_TOKEN }}
# Image name
image: ${{ env.KANIKO_IMAGE_BASE }}
# Image tag
tag: ${{ env.TAG }}
# Enables build cache
cache: true
# Docker registry meant to be used as cache
cache_registry: ${{ env.KANIKO_CACHE_REGISTRY }}
# Dockerfile filename
build_file: Dockerfile
# Path to build context
path: .
- name: build and push tag for docker collector
uses: aevea/[email protected]
with:
# Docker registry where the image will be pushed
registry: docker.io
# Username used for authentication to the Docker registry
username: ${{ secrets.DOCKER_BUILDER_USERNAME }}
# Password used for authentication to the Docker registry
password: ${{ secrets.DOCKER_BUILDER_TOKEN }}
# Image name
image: ${{ env.KANIKO_IMAGE_COLLECTOR }}
# Image tag
tag: ${{ env.TAG }}
# Enables build cache
cache: true
# Docker registry meant to be used as cache
cache_registry: ${{ env.KANIKO_CACHE_REGISTRY }}
# Dockerfile filename
build_file: Dockerfile.collector
# Path to build context
path: .
extra_args: "--build-arg BASE_IMAGE=aquaveollc/condor-base:latest"
- name: build and push tag for docker scheduler
uses: aevea/[email protected]
with:
# Docker registry where the image will be pushed
registry: docker.io
# Username used for authentication to the Docker registry
username: ${{ secrets.DOCKER_BUILDER_USERNAME }}
# Password used for authentication to the Docker registry
password: ${{ secrets.DOCKER_BUILDER_TOKEN }}
# Image name
image: ${{ env.KANIKO_IMAGE_SCHEDULER }}
# Image tag
tag: ${{ env.TAG }}
# Enables build cache
cache: true
# Docker registry meant to be used as cache
cache_registry: ${{ env.KANIKO_CACHE_REGISTRY }}
# Dockerfile filename
build_file: Dockerfile.scheduler
# Path to build context
path: .
extra_args: "--build-arg BASE_IMAGE=aquaveollc/condor-base:latest"
- name: build and push tag for docker worker
uses: aevea/[email protected]
with:
# Docker registry where the image will be pushed
registry: docker.io
# Username used for authentication to the Docker registry
username: ${{ secrets.DOCKER_BUILDER_USERNAME }}
# Password used for authentication to the Docker registry
password: ${{ secrets.DOCKER_BUILDER_TOKEN }}
# Image name
image: ${{ env.KANIKO_IMAGE_WORKER }}
# Image tag
tag: ${{ env.TAG }}
# Enables build cache
cache: true
# Docker registry meant to be used as cache
cache_registry: ${{ env.KANIKO_CACHE_REGISTRY }}
# Dockerfile filename
build_file: Dockerfile.worker
# Path to build context
path: .
extra_args: "--build-arg BASE_IMAGE=aquaveollc/condor-base:latest"
- name: build and push tag for docker standalone
uses: aevea/[email protected]
with:
# Docker registry where the image will be pushed
registry: docker.io
# Username used for authentication to the Docker registry
username: ${{ secrets.DOCKER_BUILDER_USERNAME }}
# Password used for authentication to the Docker registry
password: ${{ secrets.DOCKER_BUILDER_TOKEN }}
# Image name
image: ${{ env.KANIKO_IMAGE_STANDALONE }}
# Image tag
tag: ${{ env.TAG }}
# Enables build cache
cache: true
# Docker registry meant to be used as cache
cache_registry: ${{ env.KANIKO_CACHE_REGISTRY }}
# Dockerfile filename
build_file: Dockerfile.standalone
# Path to build context
path: .
extra_args: "--build-arg BASE_IMAGE=aquaveollc/condor-base:latest"