Skip to content

Commit

Permalink
New changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vgottipa committed Mar 11, 2024
1 parent bb5ec6a commit 4972002
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Determine tag type
id: tag_type
run: echo "::set-output name=is_release_tag::$(echo ${GITHUB_REF#refs/tags/} | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || echo 'false')"
- name: Set version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
run: |
if [ "${{ steps.tag_type.outputs.is_release_tag }}" == "false" ]; then
echo "VERSION=v1.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -41,9 +49,17 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Determine tag type
id: tag_type
run: echo "::set-output name=is_release_tag::$(echo ${GITHUB_REF#refs/tags/} | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || echo 'false')"
- name: Set version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
run: |
if [ "${{ steps.tag_type.outputs.is_release_tag }}" == "false" ]; then
echo "VERSION=v1.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Setup AWS ECR Details
uses: aws-actions/configure-aws-credentials@v3
with:
Expand All @@ -63,4 +79,4 @@ jobs:
run: |
docker pull onedatashare/transfer_service:$IMAGE_TAG
docker tag onedatashare/transfer_service:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

0 comments on commit 4972002

Please sign in to comment.