Skip to content

Commit

Permalink
Merge pull request #73 from alliance-genome/SCRUM-3698
Browse files Browse the repository at this point in the history
SCRUM-3698: update GH actions functions and mask password
  • Loading branch information
abecerra authored Feb 16, 2024
2 parents 47634df + df4b4f5 commit c8cfc17
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/alpha-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Store release tag in env
Expand All @@ -23,14 +23,14 @@ jobs:
# This step will configure environment variables to be used by all steps
# involving AWS interaction further down
- name: AWS credentials configuration
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}}
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-build-image
aws-region: us-east-1
- name: Amazon ECR login
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
}
]
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Store release tag in env
Expand All @@ -86,7 +86,7 @@ jobs:
- name: Generate deployment package
run: zip -r ${{ env.tagname }}.zip docker-compose.yml .ebextensions/
- name: AWS credentials configuration
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}}
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-eb-deploy
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/github-actions-PR-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
echo "Repository ${{ github.repository }}."
echo "Trigger ref ${{ github.ref }}, base-ref ${{ github.base_ref }}, head_ref ${{ github.head_ref }}."
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Report files updated in PR
run: |
git fetch -q origin ${{ github.base_ref }} ${{ github.head_ref }}
git diff --name-only origin/${{ github.base_ref }} origin/${{ github.head_ref }}
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build docker image
env:
ECR_REPOSITORY: agr_mati
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/github-release-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: AWS credentials configuration
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}}
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-build-image
aws-region: us-east-1
- name: Amazon ECR login
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
Expand All @@ -31,9 +31,9 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -48,7 +48,7 @@ jobs:
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish package
run: mvn --batch-mode deploy
run: mvn --batch-mode deploy -DskipITs=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
Expand All @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Save mati app version to be deployed in EB env variables through config file
run: |
cat .ebextensions/version.config
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Generate deployment package
run: zip -r ${{ github.event.release.tag_name }}.zip docker-compose.yml .ebextensions/
- name: Store deployment package in cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ github.event.release.tag_name }}.zip
key: ${{github.workflow}}.${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-eb-deployment-zip
Expand Down Expand Up @@ -98,12 +98,12 @@ jobs:
}
]
- name: Fetch deployment package from cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ github.event.release.tag_name }}.zip
key: ${{github.workflow}}.${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-eb-deployment-zip
- name: AWS credentials configuration
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}}
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-eb-deploy-production
Expand Down Expand Up @@ -172,12 +172,12 @@ jobs:
}
]
- name: Fetch deployment package from cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ github.event.release.tag_name }}.zip
key: ${{github.workflow}}.${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-eb-deployment-zip
- name: AWS credentials configuration
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}}
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-eb-deploy-beta
Expand Down

0 comments on commit c8cfc17

Please sign in to comment.