diff --git a/.github/workflows/stag-build.yaml b/.github/workflows/stag-build.yaml deleted file mode 100644 index 570d6b3..0000000 --- a/.github/workflows/stag-build.yaml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build for Stage -on: - push: - branches: - - main - -env: - SERVICE_NAME: git - SERVICE_TYPE: be - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - java-version: [ 17 ] - outputs: - version: ${{ steps.get_version.outputs.BRANCH_NAME }} - - steps: - - name: Check Out The Repository - uses: actions/checkout@v3 - - - name: Set up Java - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java-version }} - distribution: 'zulu' - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Gradle Build - uses: gradle/gradle-build-action@v2 - with: - arguments: | - build - --no-daemon - -x test - - name: Login to ECR - id: ecr - uses: elgohr/ecr-login-action@master - with: - access_key: ${{ secrets.AWS_ACCESS_KEY }} - secret_access_key: ${{ secrets.AWS_SECRET_KEY }} - region: ${{ secrets.AWS_REGION }} - - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@v4 - with: - name: ${{env.SERVICE_NAME}}-${{env.SERVICE_TYPE}} - username: ${{ steps.ecr.outputs.username }} - password: ${{ steps.ecr.outputs.password }} - registry: ${{ steps.ecr.outputs.registry }} - tags: ${{ github.sha }} - buildargs: | - CLOUD_CONFIG_USERNAME=${{secrets.CLOUD_CONFIG_USERNAME}} - CLOUD_CONFIG_PASSWORD=${{secrets.CLOUD_CONFIG_PASSWORD}} - PROFILE=stag - - - 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 }}", - "service_name": "${{env.SERVICE_NAME}}", - "service_type": "${{env.SERVICE_TYPE}}" }' \ No newline at end of file