Skip to content

Fix name

Fix name #2

name: Docker Image for Development
on:
# should support manual trigger and PRs to the Dockerfile
push:
paths:
- 'docker/**'
- '.github/workflows/dev_docker_image.yml'
workflow_dispatch:
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Choose image tag
run: |
sha=$(git rev-parse --short HEAD)
image_ver="$(date '+%Y%m%d')-${sha}"
image_name="ghcr.io/man-group/arcticdb-dev"
echo -e "image_ver=$image_ver\nimage_name=$image_name\noutput_tag=$image_name:$image_ver" | tee -a $GITHUB_ENV
- name: Build Docker image
run: |
docker build -t $image_name . -f docker/Dockerfile
- name: Publish Docker image to GHCR
# if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master'
run: |
docker login ghcr.io -u token -p "${{secrets.GITHUB_TOKEN}}"
docker tag $image_name $image_name:$image_ver
docker push $image_name:$image_ver