Skip to content

Commit

Permalink
#001 - adjusts on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deyvisonborges committed Apr 23, 2024
1 parent 4e4dda4 commit f1f1619
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,18 @@ jobs:
- name: Build with Gradle Wrapper
run: ./gradlew clean build -x test

- name: Set build tag
run: echo "BUILD_TAG=$(echo ${{ github.head_ref || github.ref }} | sed 's,/,_,g')-${{ github.run_number }}" >> $GITHUB_ENV

- name: Print BUILD_TAG
run: echo "Branch ---> ${{ github.head_ref || github.ref }}" && echo "Tag ---> ${{ env.BUILD_TAG }}"

- name: Login to DockerHub
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set env
run: echo "DATE=$(date +%s)" >> $GITHUB_ENV

- name: Build and push image
uses: docker/build-push-action@v3
with:
context: .
push: true
build-args: VERSION=${{ env.BUILD_TAG }}
tags: ${{ env.IMAGE_NAME }}:${{ env.BUILD_TAG }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.DATE }}

0 comments on commit f1f1619

Please sign in to comment.