Skip to content

Commit

Permalink
Add dynamic branch detection to Docker build in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu authored Dec 17, 2024
1 parent 79ffed0 commit d100d3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ant-media-server-docker-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ jobs:
run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/master/docker/Dockerfile_RockyLinux -O Dockerfile

- name: Build Docker image
run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip .
env:
BRANCH_NAME: ${{ github.ref_name }}
run: |
echo "Building Docker image with branch: $BRANCH_NAME"
docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip --build-arg BranchName=$BRANCH_NAME .
- name: Run the image
run: docker run -d -p 5080:5080 --name antmediaserver antmediaserver
Expand Down

0 comments on commit d100d3c

Please sign in to comment.