File tree 2 files changed +40
-1
lines changed
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Push Image
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - v*.*.*
7
+ jobs :
8
+ build-and-push :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Check out
12
+ - uses : actions/checkout@v2
13
+ - name : Docker meta
14
+ id : meta
15
+ uses : docker/metadata-action@v3
16
+ with :
17
+ # list of Docker images to use as base name for tags
18
+ images : |
19
+ ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/stripe-mock
20
+ # generate Docker tags based on the following events/attributes
21
+ tags: |
22
+ type=pep440,pattern={{version}}
23
+ - name : Configure AWS credentials
24
+ uses : aws-actions/configure-aws-credentials@v1
25
+ with :
26
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
27
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
28
+ aws-region : ${{ secrets.AWS_REGION }}
29
+ - name : Login to Amazon ECR
30
+ id : login-ecr
31
+ uses : aws-actions/amazon-ecr-login@v1
32
+ - name : Build and push image
33
+ id : docker_build
34
+ uses : docker/build-push-action@v2
35
+ with :
36
+ context : .
37
+ push : true
38
+ tags : ${{ steps.meta.outputs.tags }}
39
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1
1
GIT_COMMITSHA = $(shell git rev-parse HEAD)
2
2
IMAGE_NAME = "stripemock/stripe-mock"
3
3
4
- all : test vet lint check-gofmt build
4
+ all : test vet lint build
5
5
6
6
build :
7
7
go build -mod=vendor -o stripe-mock
You can’t perform that action at this time.
0 commit comments