Skip to content

Commit

Permalink
Testing GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TreyWW committed Feb 11, 2024
1 parent e8507c2 commit ea58b97
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/push_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy to App Runner
on:
# release:
# types:
# - released
push:
branches:
- enhance/production
workflow_dispatch: # Allow manual invocation of the workflow

jobs:
deploy:
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read

steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Configure AWS credentials
id: aws-credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
# role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

0 comments on commit ea58b97

Please sign in to comment.