-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (28 loc) · 1.18 KB
/
release.yml
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
on:
release:
types:
- published
jobs:
register:
runs-on:
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Docker layers
uses: jpribyl/[email protected]
continue-on-error: true
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Authenticate Docker
run: aws ecr-public get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin public.ecr.aws/h4u2q3r3
- name: Build Docker AMI
run: docker build -t maestro .
- name: Tag Docker AMI
run: docker tag maestro:latest public.ecr.aws/h4u2q3r3/maestro:${GITHUB_REF:10}
- name: Push Docker AMI
run: docker push public.ecr.aws/h4u2q3r3/maestro:${GITHUB_REF:10}