Skip to content

Commit 2e1b2b6

Browse files
authored
Add Commit Status Verification to deploy-template (#20031)
* Add commit status verification * github sha to workflow run head commit id * Change additional instance
1 parent 9261ded commit 2e1b2b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
file: ./postman/Dockerfile
5252
push: true
5353
tags: |
54-
${{ steps.login-ecr.outputs.registry }}/dsva/vets-api-postman:${{ github.sha }}
54+
${{ steps.login-ecr.outputs.registry }}/dsva/vets-api-postman:${{ github.event.workflow_run.head_commit.id }}
5555
- name: Build vets-api Docker Image
5656
uses: docker/build-push-action@v6
5757
env:
@@ -64,7 +64,7 @@ jobs:
6464
context: .
6565
push: true
6666
tags: |
67-
${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}:${{ github.sha }}
67+
${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}:${{ github.event.workflow_run.head_commit.id }}
6868
cache-from: type=registry,ref=$ECR_REGISTRY/$ECR_REPOSITORY
6969
cache-to: type=inline
7070
deploy:
@@ -75,7 +75,7 @@ jobs:
7575
ecr_repository: "vets-api"
7676
manifests_directory: "vets-api"
7777
auto_deploy_envs: "dev staging prod sandbox"
78-
commit_sha: ${{ github.sha }}
78+
commit_sha: ${{ github.event.workflow_run.head_commit.id }}
7979
secrets:
8080
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
8181
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/deploy-template.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
auto_deploy_envs:
1313
required: true
1414
type: string
15-
commit_sha: # #${{ github.sha }}
15+
commit_sha: # #${{ github.event.workflow_run.head_commit.id }}
1616
required: true
1717
type: string
1818
secrets:

0 commit comments

Comments
 (0)