-
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.
- Loading branch information
Showing
2 changed files
with
48 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,59 +16,59 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
with: | ||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
# - name: Install Terraform | ||
# uses: hashicorp/setup-terraform@v3 | ||
# with: | ||
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-3 | ||
# - name: Configure AWS credentials | ||
# uses: aws-actions/configure-aws-credentials@v1 | ||
# with: | ||
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
# aws-region: eu-west-3 | ||
|
||
- name: Create Secrets | ||
uses: 1arp/[email protected] | ||
with: | ||
path: 'src/main/resources/config' | ||
is AbsolutePath: false | ||
file: 'application-secret.properties' | ||
content: | | ||
riot.api.key=${{ secrets.RIOT_API_KEY }} | ||
disc.api.key=${{ secrets.DISCORD_API_KEY }} | ||
# - name: Create Secrets | ||
# uses: 1arp/[email protected] | ||
# with: | ||
# path: 'src/main/resources/config' | ||
# is AbsolutePath: false | ||
# file: 'application-secret.properties' | ||
# content: | | ||
# riot.api.key=${{ secrets.RIOT_API_KEY }} | ||
# disc.api.key=${{ secrets.DISCORD_API_KEY }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
cache: maven | ||
# - name: Set up JDK 17 | ||
# uses: actions/setup-java@v3 | ||
# with: | ||
# java-version: '17' | ||
# distribution: 'adopt' | ||
# cache: maven | ||
|
||
# - name: Test with Maven | ||
# run: mvn clean test | ||
# # - name: Test with Maven | ||
# # run: mvn clean test | ||
|
||
- name: Build with Maven | ||
run: mvn clean package -DskipTests | ||
# - name: Build with Maven | ||
# run: mvn clean package -DskipTests | ||
|
||
- name: Terraform Init | ||
run: terraform init | ||
working-directory: ./terraform | ||
# - name: Terraform Init | ||
# run: terraform init | ||
# working-directory: ./terraform | ||
|
||
- name: Terraform Apply | ||
run: terraform apply -auto-approve | ||
working-directory: ./terraform | ||
# - name: Terraform Apply | ||
# run: terraform apply -auto-approve | ||
# working-directory: ./terraform | ||
|
||
- name: Configure git_config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
# - name: Configure git_config | ||
# run: | | ||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "GitHub Actions" | ||
|
||
- name: Changing .tfstate name to date/Add/Commit/Push changes | ||
run: | | ||
DATE=$(date +%Y%m%d) | ||
mv ./terraform/terraform.tfstate ./terraform/${DATE}.tfstate | ||
git add ./terraform/${DATE}.tfstate | ||
git commit -m "Added .tfstate with date ${DATE}" | ||
git push origin HEAD:AWS202405 | ||
# - name: Changing .tfstate name to date/Add/Commit/Push changes | ||
# run: | | ||
# DATE=$(date +%Y%m%d) | ||
# mv ./terraform/terraform.tfstate ./terraform/${DATE}.tfstate | ||
# git add ./terraform/${DATE}.tfstate | ||
# git commit -m "Added .tfstate with date ${DATE}" | ||
# git push origin HEAD:AWS202405 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy JAR | ||
name: Deploy JAR Pipeline | ||
|
||
on: | ||
push: | ||
|