Skip to content

Update docker-build.yml #4

Update docker-build.yml

Update docker-build.yml #4

Workflow file for this run

name: Docker Build
on:
push:
branches:
- master
- docker
tags:
- '*'
jobs:
push-test:
runs-on: ubuntu-latest
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_UNAME }}
password: ${{ secrets.DOCKER_PASS }}
- name: Pull "hello-world" image
run: docker pull hello-world
- name: Tag and Push "hello-world" image
run: |
docker tag hello-world:latest yazdanz/groundgan:hello-world
docker push yazdanz/groundgan:hello-world
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Get commit SHA
# run: echo "COMMIT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
# - name: Determine image version
# id: versioning
# run: |
# if [ -n "${GITHUB_REF##*/}" ]; then
# echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
# else
# echo "VERSION=${COMMIT_SHA}" >> $GITHUB_ENV
# fi
# - name: Build Docker image
# run: |
# IMAGE_VERSION=${VERSION}
# docker build -t groundgan:$IMAGE_VERSION -f docker/Dockerfile .
# docker tag groundgan:$IMAGE_VERSION groundgan:latest
# - name: Log in to Docker Hub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_UNAME }}
# password: ${{ secrets.DOCKER_PASS }}
# - name: Push Docker image
# run: |
# IMAGE_VERSION=${VERSION}
# docker push yazdanz/groundgan:$IMAGE_VERSION
# docker push yazdan/groundgan:latest