Skip to content

Commit

Permalink
Artifact + Matrix - 5
Browse files Browse the repository at this point in the history
Working finally!
Changed the deprecated set-output command to use {key}={value} format with echo command.

Also, adding commented out build and push commands to see if build, push is successful.
For this commit, not changing branch = tags-artifact in fetch_runID.py
Once, server code has latest working yml file, then will come back and push another commit to change branch to tags-combo-approach.
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed May 2, 2024
1 parent d66893b commit 39b289f
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/image_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,7 @@ jobs:
cat tag_file.txt
docker_image_tag=$(cat tag_file.txt)
echo $docker_image_tag
# echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT"
echo "Checking set-output value..."
echo "::set-output name=docker_image_tag::$docker_image_tag" >> "$GITHUB_OUTPUT"
echo "Checking key=value..."
echo "docker_image_tag=$(echo $docker_image_tag)" >> $GITHUB_OUTPUT
- name: Check artifact tag in output
run: echo "${{ steps.get_docker_tag.outputs.docker_image_tag }}"
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -139,15 +132,15 @@ jobs:
run: echo running in repo ${GITHUB_REPOSITORY#*/} branch ${GITHUB_REF##*/} on ${{ steps.date.outputs.date }}

# Runs a set of commands using the runners shell
# - name: build docker image
# run: |
# if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
# docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_2 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} .
# else
# docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_1 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} .
# fi
# docker images

# - name: push docker image
# run: |
# docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}
- name: build docker image
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_2 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} .
else
docker build --build-arg DOCKER_IMAGE_TAG=$DOCKER_IMAGE_TAG_1 -t $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }} .
fi
docker images
- name: push docker image
run: |
docker push $DOCKER_USER/${GITHUB_REPOSITORY#*/}:${GITHUB_REF##*/}_${{ steps.date.outputs.date }}

0 comments on commit 39b289f

Please sign in to comment.