Skip to content

Merge pull request #1260 from sinapis-amicus/master #1

Merge pull request #1260 from sinapis-amicus/master

Merge pull request #1260 from sinapis-amicus/master #1

Workflow file for this run

name: Docker Image Creation
on:
push:
branches:
- master
tags:
- '**'
jobs:
base-image:
runs-on: ubuntu-latest
name: Create the base image
steps:
- uses: actions/checkout@v2
- name: Fetch git tags
run: git fetch --unshallow origin +refs/tags/*:refs/tags/*
- name: Build the base docker image
run: docker pull partkeepr/base-dev:latest && docker build docker/base-dev --file docker/base-dev/Dockerfile --cache-from partkeepr/base-dev:latest --tag partkeepr/base-dev:latest
- name: Tag the base docker image with git hash
run: docker tag partkeepr/base-dev:latest partkeepr/base-dev:$(git describe)
- name: Deploy the base docker images
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_TOKEN }}
docker push partkeepr/base-dev:latest
docker push partkeepr/base-dev:$(git describe)
development-image:
runs-on: ubuntu-latest
needs: base-image
name: Create the development image
steps:
- uses: actions/checkout@v2
- name: Fetch git tags
run: git fetch --unshallow origin +refs/tags/*:refs/tags/*
- name: Build development image
run: |
docker pull partkeepr/development:latest
docker build docker/development/app --file docker/development/app/Dockerfile --tag partkeepr/development:latest --build-arg SRC_IMAGE=partkeepr/base-dev:$(git describe) --cache-from partkeepr/development:latest
- name: Tag the development docker image with git hash
run: docker tag partkeepr/development:latest partkeepr/development:$(git describe)
- name: Deploy the development docker images
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_TOKEN }}
docker push partkeepr/development:latest
docker push partkeepr/development:$(git describe)