Skip to content

refactor: improve code clarity and add fmt and lint ci #1

refactor: improve code clarity and add fmt and lint ci

refactor: improve code clarity and add fmt and lint ci #1

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
branches: ["main"]
permissions:
contents: read
id-token: write
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: haya14busa/action-cond@v1
id: image_tag
with:
cond: ${{ startsWith(github.ref, 'refs/tags/') }}
if_true: ${{ github.ref_name }}
if_false: ${{ github.sha }}
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::192824654885:role/github-actions-ecr
aws-region: eu-west-2
- uses: aws-actions/amazon-ecr-login@v1
id: ecr_login
- run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
env:
DOCKER_BUILDKIT: "1"
ECR_REGISTRY: ${{ steps.ecr_login.outputs.registry }}
ECR_REPOSITORY: beacon
IMAGE_TAG: ${{ steps.image_tag.outputs.value }}