File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}"}'
You can’t perform that action at this time.
0 commit comments