forked from awslabs/aws-sigv4-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (57 loc) · 1.5 KB
/
push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: push
on: push
permissions:
contents: read
id-token: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.15"
- run: go test -v -cover $(shell go list ./... | grep -v /vendor)
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.15"
- run: CGO_ENABLED=0 GOOS=linux go build -o bin/aws-sigv4-proxy
- uses: actions/upload-artifact@v4
with:
name: bin
path: bin/
docker-latest:
needs:
- test
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ECR_IAM_ROLE }}
- uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: "true"
- uses: actions/download-artifact@v4
with:
name: bin
path: bin/
- id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.IMAGE_NAME_DEFAULT }}
tags: |
type=semver,pattern={{raw}}
type=sha,prefix=,format=long,
- uses: docker/build-push-action@v5
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}