Skip to content

Commit

Permalink
fix main deploy yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wken5577 committed Jul 19, 2023
1 parent d730521 commit b1ffa4f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/main-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: wken5577/42gg-server
LAST_VERSION_TAG : ${{ secrets.LAST_VERSION_TAG }}
VERSION_TAG : ${{ secrets.VERSION_TAG }}

permissions:
contents: read
Expand Down Expand Up @@ -49,16 +49,12 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build

- name: Store latest image as new tag
run: |
docker pull ${{ env.IMAGE_NAME }}:latest
docker tag ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:${{ env.LAST_VERSION_TAG }}
docker push ${{ env.IMAGE_NAME }}:${{ env.LAST_VERSION_TAG }}
- name: build new docker image as latest tag
run: |
docker build -t ${{ env.IMAGE_NAME }}:latest .
docker push ${{ env.IMAGE_NAME }}:latest
docker tag ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:${{ env.VERSION_TAG }}
docker push ${{ env.IMAGE_NAME }}:${{ env.VERSION_TAG }}
- name: Get Github Actions IP
id: ip
Expand Down

0 comments on commit b1ffa4f

Please sign in to comment.