-
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 #6 from dvillavicencio/create-deployment-pipeline
Create deployment pipeline
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Deployment to EC2 | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 for x64 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Run the Gradle Build | ||
run: ./gradlew clean build | ||
|
||
- name: Archive build JARs | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: uploaded-artifact | ||
path: | | ||
/build/libs/destiny2bot-**.jar \ | ||
!/build/libs/destiny2bot-**-plain.jar | ||
- name: Set Project name and version as environment variables | ||
run: | | ||
echo "PROJECT_VERSION=$(./gradlew -q version)" >> $GITHUB_ENV \ | ||
echo "PROJECT_NAME=$(./gradlew -q projectName)" >> $GITHUB_ENV | ||
- name: Verify environment variables | ||
run: | | ||
echo {{ env.PROJECT_VERSION }} \ | ||
echo {{ env.PROJECT_NAME }} | ||
# dockerize-and-upload: | ||
# needs: build-and-package | ||
|
||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Login to Docker | ||
# uses: docker@login-action@v3 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# - name: Set up Docker Buildx | ||
# uses: docker/setup-buildx-action@v3 | ||
|
||
# - name: Build and Push | ||
# uses: docker/build-push-action@v5 |
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