Skip to content

Commit

Permalink
⚡️ :: prod version
Browse files Browse the repository at this point in the history
  • Loading branch information
leeseojune53 authored Jun 5, 2022
1 parent 48b0244 commit 8b82d93
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/prod-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ jobs:
with:
java-version: ${{ matrix.java-version }}
distribution: 'zulu'

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)

- name: Gradle Build
uses: gradle/gradle-build-action@v2
with:
arguments: |
build
--no-daemon
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
Expand All @@ -47,7 +52,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{secrets.DOCKER_USER}}/${{env.SERVICE_NAME}}-${{env.SERVICE_TYPE}}:${{ github.sha }}
tags: ${{secrets.DOCKER_USER}}/${{env.SERVICE_NAME}}-${{env.SERVICE_TYPE}}:${{ steps.get_version.outputs.VERSION }}
build-args : |
DB_URL=${{secrets.DB_URL_STAGE}}
DB_USERNAME=${{secrets.DB_USERNAME_STAGE}}
Expand All @@ -58,13 +63,16 @@ jobs:
AWS_ACCESS_KEY=${{secrets.AWS_ACCESS_KEY}}
AWS_SECRET_KEY=${secrets.AWS_SECRET_KEY}}
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GITOPS_DEPLOY_STAGE_TOKEN }}
repository: team-xquare/xquare-gitops-repo-staging
event-type: update_image
client-payload: '{"ref": "${{ github.ref }}",
"version": "${{ github.sha }}",
client-payload: '{
"ref": "${{ github.ref }}",
"version": "${{ steps.get_version.outputs.VERSION }}",
"service_name": "${{env.SERVICE_NAME}}",
"service_type": "${{env.SERVICE_TYPE}}"}'
"service_type": "${{env.SERVICE_TYPE}}"
}'

0 comments on commit 8b82d93

Please sign in to comment.