Skip to content

Create and Commit Next-Build Docker Image #2

Create and Commit Next-Build Docker Image

Create and Commit Next-Build Docker Image #2

Workflow file for this run

name: Create and Commit Next-Build Docker Image
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
on:
workflow_dispatch:
inputs:
image_tag:
description: Image tag version
type: string
required: true
default: "1.0.0"
jobs:
mirror:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
path: next-build
- uses: actions/checkout@v4
with:
repository: department-of-veterans-affairs/vets-website
path: vets-website
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-gov-west-1
role-to-assume: ${{ vars.AWS_ASSUME_ROLE }}
role-duration-seconds: 900
role-session-name: vsp-vagov-next-build-githubaction
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: "dsva/next-build-node"
IMAGE_TAG: ${{ inputs.image_tag }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f next-build/docker/Dockerfile
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG