Skip to content

Commit

Permalink
fix(CI): Update dotnetCI_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aliyaghini authored Aug 13, 2024
1 parent cb2748f commit 6abb014
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/dotnetCI_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ jobs:

- name: Print new tag
run: echo ${{ steps.tag_version.outputs.new_tag }}

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Build the Docker image
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/dotnetdev:${{ steps.tag_version.outputs.new_tag }} .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/dotnetdev:${{ steps.tag_version.outputs.new_tag }}
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,18 +70,18 @@ jobs:
working-directory: AnalysisData
run: dotnet test ./AnalysisData.sln

deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}
# deploy:
# runs-on: ubuntu-22.04
# permissions:
# contents: write
# steps:
# - name: Log in to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_PASS }}

- name: Build the Docker image
run: |
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/dotnetdev:${{ version.steps.tag_version.outputs.new_tag }} .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/dotnetdev:${{ version.steps.tag_version.outputs.new_tag }}
# - name: Build the Docker image
# run: |
# docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/dotnetdev:${{ version.steps.tag_version.outputs.new_tag }} .
# docker push ${{ secrets.DOCKERHUB_USERNAME }}/dotnetdev:${{ version.steps.tag_version.outputs.new_tag }}

0 comments on commit 6abb014

Please sign in to comment.