Skip to content

Commit

Permalink
Update docker-build-and-push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dejain4 committed Mar 2, 2024
1 parent fceb422 commit ba14683
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ jobs:

- name: Get image details from poetry.toml (custom script)
run: |
# Extract image name and tag from poetry.toml
IMAGE_NAME=$(cat poetry.toml | grep name= | cut -d '=' -f2 | tr -d ' ')
IMAGE_TAG=$(cat poetry.toml | grep version= | cut -d '=' -f2 | tr -d ' ')
# Set outputs for subsequent steps
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_OUTPUT
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_OUTPUT
# Extract image name and tag from poetry.toml
IMAGE_NAME=$(cat poetry.toml | grep name= | cut -d '=' -f2 | tr -d ' ')
IMAGE_TAG=$(cat poetry.toml | grep version= | cut -d '=' -f2 | tr -d ' ')
# Set outputs with echo for verification
echo "IMAGE_NAME=$IMAGE_NAME"
echo "IMAGE_TAG=$IMAGE_TAG"

# Set outputs for subsequent steps
echo "NAME=$IMAGE_NAME" >> $GITHUB_OUTPUT
echo "TAG=$IMAGE_TAG" >> $GITHUB_OUTPUT


- name: Build and push Docker image
uses: docker/buildx-action@v3 # Use dedicated buildx action
Expand Down

0 comments on commit ba14683

Please sign in to comment.