Skip to content

fix: change tag

fix: change tag #6

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- development
jobs:
build-and-push-docker-image:
name: Build and push a new docker image
runs-on: ubuntu-latest
steps:
- name: Checkout the source code from the Github repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
timeout-minutes: 5
- name: Create Tag
id: tag
run: echo "tag=frontend-${{ github.ref_name }}-$(git rev-parse --short HEAD)-$(date +%s)" >> $GITHUB_OUTPUT
timeout-minutes: 5
- name: Login to ECR
uses: docker/login-action@v3
with:
registry: ${{ secrets.AWS_ECR_REGISTRY }}
username: ${{ secrets.AWS_ECR_ACCESS_KEY_ID}}
password: ${{ secrets.AWS_ECR_SECRET_ACCESS_KEY }}
timeout-minutes: 5
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ secrets.AWS_ECR_REGISTRY }}/${{ vars.AWS_ECR_REPOSITORY_APP }}:${{ steps.tag.outputs.tag }}
timeout-minutes: 5