Skip to content

Add version undefined #2

Add version undefined

Add version undefined #2

name: Deploy Explorer to Docker Hub
on:
push:
branches: [ "dev" ]
env:
BUILD_DIR: Tools/GbxExplorer/Server
IMAGE_NAME: gbx-explorer
VERSION: undefined
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set lowercase repository_owner and tag_name without v
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
echo "VERSION=${TAG#v}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
TAG: '${{ github.event.release.tag_name }}'
- name: Build Docker Image
run: docker build . -f $BUILD_DIR/Dockerfile -t ghcr.io/$OWNER_LC/$IMAGE_NAME -t ghcr.io/$OWNER_LC/$IMAGE_NAME:$VERSION -t ${{ secrets.DOCKER_USERNAME }}/$IMAGE_NAME -t ${{ secrets.DOCKER_USERNAME }}/$IMAGE_NAME:$VERSION