Skip to content

Commit

Permalink
fix workflows to remove java-specific steps
Browse files Browse the repository at this point in the history
  • Loading branch information
digorgonzola committed Feb 27, 2024
1 parent 1051340 commit 21986c5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 49 deletions.
2 changes: 0 additions & 2 deletions .github/environment/central.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
AWS_REGION=ap-southeast-2
AWS_ROLE_ARN=arn:aws:iam::851725428481:role/AodnGitHubActionsRole
CODEARTIFACT_DOMAIN=central-aodn-org-au
CODEARTIFACT_REPO=maven-aodn-store
ECR_REGISTRY=851725428481.dkr.ecr.ap-southeast-2.amazonaws.com
ECR_REPOSITORY=sample-django-app
12 changes: 0 additions & 12 deletions .github/workflows/build_deploy_edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: 'codeartifact'
server-password: 'CODEARTIFACT_AUTH_TOKEN'

- name: Configure AWS Credentials
id: aws_auth
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -45,9 +36,6 @@ jobs:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE_ARN }}

- name: Build with Maven
run: mvn -B verify --file pom.xml

- name: Login to ECR
uses: docker/login-action@v3
with:
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: 'codeartifact'
server-password: 'CODEARTIFACT_AUTH_TOKEN'

- name: Configure AWS Credentials
id: aws_auth
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -42,32 +33,6 @@ jobs:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE_ARN }}

- name: Get CodeArtifact Repository Authentication Token
run: |
TOKEN=$(aws codeartifact get-authorization-token \
--domain ${{ vars.CODEARTIFACT_DOMAIN }} \
--domain-owner ${{ steps.aws_auth.outputs.aws-account-id }} \
--region ${{ vars.AWS_REGION }} \
--query authorizationToken \
--output text)
echo "CODEARTIFACT_AUTH_TOKEN=$TOKEN" >> "$GITHUB_ENV"
- name: Get CodeArtifact Repository URL
run: |
REPO_URL=$(aws codeartifact get-repository-endpoint \
--domain ${{ vars.CODEARTIFACT_DOMAIN }} \
--repository ${{ vars.CODEARTIFACT_REPO }} \
--format maven \
--region ${{ vars.AWS_REGION }} \
--output text)
echo "CODEARTIFACT_REPO_URL=$REPO_URL" >> "$GITHUB_ENV"
- name: Build with Maven & Publish to CodeArtifact
run: mvn -B clean deploy --file pom.xml
env:
CODEARTIFACT_AUTH_TOKEN: ${{ env.CODEARTIFACT_AUTH_TOKEN }}
CODEARTIFACT_REPO_URL: ${{ env.CODEARTIFACT_REPO_URL }}

- name: Login to ECR
uses: docker/login-action@v3
with:
Expand Down

0 comments on commit 21986c5

Please sign in to comment.