Skip to content

lowercase the repo name #12

lowercase the repo name

lowercase the repo name #12

Workflow file for this run

name: Build and Run Docker Image
on:
push:
branches:
- 'ci' # Trigger on push to release branches
jobs:
build_and_run:
runs-on: ubuntu-latest # Use a GitHub-hosted runner
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Image name
run: echo IMAGE_NAME=${{ github.event.repository.name }} | tr '[A-Z]' '[a-z]' | tee -a $GITHUB_ENV
- name: Set Up Docker Build
env:
RELEASE_VERSION: ${{ github.ref_name }} # Extract version from branch name
run: |
echo "Building release version $RELEASE_VERSION"
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
- name: Build Docker Image
run: |
echo ${{env.IMAGE_NAME}}:${{ github.ref_name }}
# docker build . --file Dockerfile --tag $DOCKER_IMAGE_NAME:$RELEASE_VERSION
# - name: Run Docker Container
# run: |
# docker images
# #docker run --name my_running_container $DOCKER_IMAGE_NAME:$RELEASE_VERSION
# - name: Clean Up
# run: |
# docker rm -f my_running_container || true
# docker rmi $DOCKER_IMAGE_NAME:$RELEASE_VERSION || true