Skip to content

Update contributors.md #215

Update contributors.md

Update contributors.md #215

# EDIT this workflow name
name: Push to DockerHub
on:
push:
branches: [ master ]
tags: [ 'v*' ]
env:
# EDIT this env variable
IMAGE_ID: docker.io/approach0/docs
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build image
run: |
GITSRC=$(echo "${{ github.event.repository.html_url }}")
docker build --build-arg GITSRC=${GITSRC} . --file Dockerfile --tag tmp
# EDIT this Docker registry credentials
- name: Docker registry login
run: echo "${{ secrets.DOCKERHUBPASSWORD }}" | docker login docker.io -u approach0 --password-stdin
- name: Push image
run: |
# Example "ref": "refs/tags/0.3.1"
VERSION=$(echo "${{ github.ref }}" | sed -e 's@.*/\(.*\)@\1@')
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag tmp $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION