Skip to content

Updating readme.md, adding status badges, renaming build job, updatin… #6

Updating readme.md, adding status badges, renaming build job, updatin…

Updating readme.md, adding status badges, renaming build job, updatin… #6

Workflow file for this run

name: Build
on:
push:
branches:
- master
- dev
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: '6.x'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: apptality
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract GitVersion variables
id: gitversion
uses: gittools/actions/gitversion/execute@v3.0.0
- name: Build and push Docker images (Linux)
run: |
DOCKER_ORG_NAME=${DOCKER_ORG_NAME:-apptality}
DOCKER_APP_NAME=${APP_NAME:-aws-ecs-cloudmap-prometheus-discovery}
DOCKER_IMAGE_NAME="${DOCKER_ORG_NAME}/${DOCKER_APP_NAME}"
DOCKER_IMAGE_TAG=${{ steps.gitversion.outputs.fullSemVer }}
DOCKER_IMAGE="${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}"
echo "Building and pushing ${DOCKER_IMAGE}"
docker buildx build --file Dockerfile --platform linux/amd64,linux/arm64 --tag $DOCKER_IMAGE --push .
# docker tag $IMAGE_NAME:$DOCKER_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$DOCKER_IMAGE
# docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$DOCKER_IMAGE