Skip to content

Commit 3fde5ce

Browse files
committed
clean up
1 parent 707825e commit 3fde5ce

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
uses: aws-actions/amazon-ecr-login@v2
3333

3434
- name: Build, tag, and push docker image to Amazon ECR
35+
id: build-image
3536
env:
3637
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
3738
REPOSITORY: ${{ env.ECR_REPOSITORY }}
@@ -42,12 +43,15 @@ jobs:
4243
docker tag $REGISTRY/$REPOSITORY:$IMAGE_TAG $REGISTRY/$REPOSITORY
4344
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
4445
docker push $REGISTRY/$REPOSITORY
45-
46-
# - name: Trigger workflow in another repository
47-
# uses: peter-evans/repository-dispatch@v2
48-
# with:
49-
# token: ${{ secrets.PAT_TOKEN }}
50-
# repository: vidalme/infra-aws-ascan
51-
# event-type: ascan-image-built
52-
# client-payload: '{"image_tag": "${{ github.sha }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
53-
46+
47+
# Set output variables for use in next steps
48+
echo "image_uri_with_tag=${REGISTRY}/${REPOSITORY}:${IMAGE_TAG}" >> $GITHUB_OUTPUT
49+
50+
- name: Trigger workflow in another repository
51+
uses: peter-evans/repository-dispatch@v2
52+
with:
53+
token: ${{ secrets.PAT_TOKEN }}
54+
repository: vidalme/infra-aws-ascan
55+
event-type: ascan-image-built
56+
client-payload: '{
57+
"image_uri_with_tag": "${{ steps.build-image.outputs.image_uri_with_tag }}"}'

0 commit comments

Comments
 (0)