Skip to content

Docker Image CI Submodules #4

Docker Image CI Submodules

Docker Image CI Submodules #4

name: Docker Image CI Submodules
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
APP_NAME: engine-static
steps:
- name: "Get branch name and save to env"
env:
IS_PR: ${{ github.EVENT_NAME == 'pull_request' }}
run: |
if ${IS_PR}; then
TAG="${GITHUB_HEAD_REF}"
else
TAG="${GITHUB_REF##*/}"
fi
echo "TAG=${TAG}" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
submodules: 'recursive'
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish to Docker Repository
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: codingfy/${{ env.APP_NAME }}:${{ env.TAG }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: Dockerfile_mt