Skip to content

Create start.sh

Create start.sh #3

Workflow file for this run

name: Publish Docker image
on:
push:
branches:
- main
release:
types: [published]
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: get_image_name
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
repository=${{ github.repository }}
IMAGE_NAME=${{ github.actor }}/${repository##*/}:$VERSION
echo IMAGE_NAME=$IMAGE_NAME
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ env.IMAGE_NAME }}