-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from TeamDilly/develop
v1.7.0
- Loading branch information
Showing
86 changed files
with
2,969 additions
and
1,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,6 @@ on: | |
branches: | ||
- main | ||
- develop | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -29,13 +25,21 @@ jobs: | |
distribution: 'temurin' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Run build Flyway Module | ||
run: ./gradlew clean packy-flyway:build | ||
|
||
- name: Run FlywayApplication | ||
run: java -Dspring.profiles.active=${{ env.PROFILE }} -jar ./packy-flyway/build/libs/packy-flyway-0.0.1-SNAPSHOT.jar | ||
env: | ||
PROFILE: ${{ github.ref == 'refs/heads/main' && 'prod' || 'dev' }} | ||
|
||
- name: Run build with Gradle Wrapper | ||
run: ./gradlew clean build --parallel | ||
|
||
- name: Report to CodeCov | ||
uses: codecov/codecov-action@v4 | ||
- name: Add coverage to PR | ||
uses: madrapps/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: 'packy-support/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml' | ||
paths: ${{ github.workspace }}/packy-support/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml | ||
token: ${{ secrets.ACTION_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Reusable Deploy Workflow | ||
|
||
permissions: | ||
contents: read | ||
on: | ||
workflow_call: | ||
inputs: | ||
profile: | ||
type: string | ||
required: true | ||
secrets: | ||
ACTION_TOKEN: | ||
required: true | ||
AWS_ACCESS_KEY: | ||
required: true | ||
AWS_SECRET_ACCESS_KEY: | ||
required: true | ||
AWS_REGION: | ||
required: true | ||
CODECOV_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.ACTION_TOKEN }} | ||
submodules: true | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Build with Gradle & Upload Image to ECR | ||
run: ./gradlew -P${{ inputs.profile }} clean jib | ||
|
||
- name: Get current time | ||
uses: josStorer/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYYMMDD_HH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
- name: Generate deployment package | ||
run: | | ||
mkdir -p deploy/.platform/nginx/conf.d | ||
cp Dockerrun.aws.${{ inputs.profile }}.json deploy/Dockerrun.aws.json | ||
cp -r .ebextensions-${{ inputs.profile }} deploy/.ebextensions | ||
cp .platform/nginx/conf.d/proxy-${{ inputs.profile }}.conf deploy/.platform/nginx/conf.d/proxy.conf | ||
cd deploy && zip -r deploy.zip . | ||
- name: Beanstalk Deploy | ||
uses: einaregilsson/beanstalk-deploy@v22 | ||
with: | ||
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }} | ||
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
application_name: packy-${{ inputs.profile }}-beanstalk | ||
environment_name: Packy-${{ inputs.profile }}-beanstalk-env | ||
version_label: packy-${{ inputs.profile }}-${{steps.current-time.outputs.formattedTime}} | ||
region: ${{ secrets.AWS_REGION }} | ||
deployment_package: deploy/deploy.zip | ||
wait_for_environment_recovery: 200 |
Oops, something went wrong.