File tree Expand file tree Collapse file tree 3 files changed +25
-24
lines changed Expand file tree Collapse file tree 3 files changed +25
-24
lines changed Original file line number Diff line number Diff line change 38
38
e2e-ec2-test :
39
39
runs-on : ubuntu-latest
40
40
container :
41
- image : ghcr.io/aws-observability/aws-application-signals-test-framework
42
- credentials :
43
- username : ${{ github.actor }}
44
- password : ${{ secrets.PAT_PACKAGE_READ_ACCESS_TOKEN }}
41
+ image : public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
45
42
steps :
46
43
- uses : actions/checkout@v4
47
44
with :
Original file line number Diff line number Diff line change 41
41
e2e-eks-test :
42
42
runs-on : ubuntu-latest
43
43
container :
44
- image : ghcr.io/aws-observability/aws-application-signals-test-framework
45
- credentials :
46
- username : ${{ github.actor }}
47
- password : ${{ secrets.PAT_PACKAGE_READ_ACCESS_TOKEN }}
48
-
44
+ image : public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
49
45
steps :
50
46
- uses : actions/checkout@v4
51
47
with :
Original file line number Diff line number Diff line change @@ -2,29 +2,37 @@ name: Create and publish a Docker image
2
2
3
3
on :
4
4
workflow_dispatch :
5
- env :
6
- REGISTRY : ghcr.io
7
- IMAGE_NAME : ${{ github.repository }}
5
+
6
+ permissions :
7
+ id-token : write
8
+ contents : read
8
9
9
10
jobs :
10
11
build-and-push-image :
11
12
runs-on : ubuntu-latest
12
- permissions :
13
- contents : read
14
- packages : write
15
13
steps :
16
14
- name : Checkout repository
17
15
uses : actions/checkout@v4
18
16
19
- - name : Log in to the Container registry
20
- uses : docker/login-action@v3
17
+ - name : Configure AWS Credentials
18
+ uses : aws-actions/configure-aws-credentials@v4
21
19
with :
22
- registry : ${{ env.REGISTRY }}
23
- username : ${{ github.actor }}
24
- password : ${{ secrets.GITHUB_TOKEN }}
20
+ role-to-assume : ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }}
21
+ aws-region : us-east-1
25
22
26
- - name : Build and push Docker image
27
- uses : docker/build-push-action@v5
23
+ - name : Login to Amazon ECR
24
+ id : login-ecr-public
25
+ uses : aws-actions/amazon-ecr-login@v2
28
26
with :
29
- push : true
30
- tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
27
+ registry-type : public
28
+
29
+ - name : Build, tag, and push image to Amazon ECR
30
+ id : build-image
31
+ env :
32
+ REGISTRY : ${{ steps.login-ecr-public.outputs.registry }}
33
+ REGISTRY_ALIAS : h6o3z5z9
34
+ REPOSITORY : aws-application-signals-test-framework-workflow-container
35
+ IMAGE_TAG : latest
36
+ run : |
37
+ docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG .
38
+ docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG
You can’t perform that action at this time.
0 commit comments