deep clone of repo to fetch tags #6
Workflow file for this run
This file contains hidden or 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
| name: Deploy | |
| on: [push] | |
| permissions: | |
| id-token: write | |
| jobs: | |
| aws_deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Save Command Output | |
| id: save_command_output | |
| run: | | |
| echo "DOCKER_REPO=analytics-dashboard-ui" >> $GITHUB_ENV | |
| echo "DOCKER_TAG=$(git describe)" >> $GITHUB_ENV | |
| - name: Build Docker Image | |
| run: docker build -t ${{ env.DOCKER_REPO }}:${{ env.DOCKER_TAG }} -t ${{ env.DOCKER_REPO }}:latest . | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v6.1.0 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| - name: Push to ECR | |
| id: ecr | |
| uses: jwalton/gh-ecr-push@v2 | |
| with: | |
| region: ${{ secrets.AWS_REGION }} | |
| image: ${{ env.DOCKER_REPO }}:${{ env.DOCKER_TAG }}, ${{ env.DOCKER_REPO }}:latest |