forked from drpcorg/dshackle
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.14 KB
/
docker.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
name: Build docker image
on:
push:
branches:
- test-ci-cd
env:
ECS_TASK_DEFINITION: task-definition.json
jobs:
docker:
name: Build and push docker image
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
environment: ${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 21
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-3
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a
- name: Build docker image
run: make jib