Skip to content

Commit

Permalink
Update gradle-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thalals authored Feb 16, 2024
1 parent 6d68894 commit fb15b09
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build

- name: make env now date
id: now
run: echo "date=`date +%Y%m%d.%H%M%S`" >> "$GITHUB_OUTPUT"

- name: Make Zip File
id: file
run: name = zip -qq -r ./deployfile-`date +%Y%m%d.%H%M%S`.zip . >> "$GITHUB_OUTPUT"
run: zip -qq -r ./deployfile-${{ steps.now.outputs.date }}.zip .
shell: bash

- name: AWS credential
Expand All @@ -57,7 +61,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Upload to AWS S3
run: aws s3 cp ./${{ steps.file.outputs.name }}.zip s3://${{ secrets.S3_DEPLOY_BUCKET }}/${{ steps.file.outputs.name }}.zip
run: aws s3 cp ./deployfile-${{ steps.now.outputs.date }}.zip s3://${{ secrets.S3_DEPLOY_BUCKET }}/deployfile-${{ steps.now.outputs.date }}.zip

# - name: Deploy EC2
# run: aws deploy create-deployment --application-name ${{ env.AWS_CODE_DEPLOY_APPLICATION }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ env.AWS_CODE_DEPLOY_GROUP }} --s3-location bucket=$AWS_S3_BUCKET,key=cicdtest/$GITHUB_SHA.zip,bundleType=zip
Expand Down

0 comments on commit fb15b09

Please sign in to comment.