@@ -3,51 +3,51 @@ name: Build image and push Bea image to ECR
3
3
on :
4
4
push :
5
5
branches :
6
- - feature/dev-20159-move-top-level-folders-in-bea-to-src
6
+ - main
7
7
8
8
jobs :
9
- # build:
10
- # name: Build docker image
11
- # runs-on: ubuntu-latest
9
+ build :
10
+ name : Build docker image
11
+ runs-on : ubuntu-latest
12
12
13
- # steps:
14
- # - name: Checkout
15
- # uses: actions/checkout@v4
16
- # with:
17
- # fetch-depth: '1'
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : ' 1'
18
18
19
- # - name: Configure AWS credentials
20
- # uses: aws-actions/configure-aws-credentials@v4
21
- # with:
22
- # aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
23
- # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24
- # aws-region: eu-west-1
19
+ - name : Configure AWS credentials
20
+ uses : aws-actions/configure-aws-credentials@v4
21
+ with :
22
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
23
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24
+ aws-region : eu-west-1
25
25
26
- # - name: Login to Amazon ECR
27
- # id: login-ecr
28
- # uses: aws-actions/amazon-ecr-login@v2
26
+ - name : Login to Amazon ECR
27
+ id : login-ecr
28
+ uses : aws-actions/amazon-ecr-login@v2
29
29
30
- # - name: Generate build ID
31
- # id: prep
32
- # run: |
33
- # branch=${GITHUB_REF##*/}
34
- # sha=${GITHUB_SHA::8}
35
- # ts=$(date +%s)
36
- # echo "BUILD_ID=${branch}-${sha}-${ts}" >> "$GITHUB_OUTPUT"
37
- # - uses: docker/setup-buildx-action@v3
38
- # id: buildx
39
- # with:
40
- # install: true
41
- # - name: Build, tag, and push image to Amazon ECR
42
- # id: build-image
43
- # uses: docker/build-push-action@v6
44
- # with:
45
- # push: true
46
- # tags: ${{ steps.login-ecr.outputs.registry }}/theme-nextjs-bea:${{ steps.prep.outputs.BUILD_ID }}
47
- # secrets: |
48
- # "NEXT_PUBLIC_HCAPTCHA_SITEKEY=${{ secrets.NEXT_PUBLIC_HCAPTCHA_SITEKEY }}"
49
- # "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
50
- # "NEXT_PUBLIC_SENTRY_DSN=${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}"
30
+ - name : Generate build ID
31
+ id : prep
32
+ run : |
33
+ branch=${GITHUB_REF##*/}
34
+ sha=${GITHUB_SHA::8}
35
+ ts=$(date +%s)
36
+ echo "BUILD_ID=${branch}-${sha}-${ts}" >> "$GITHUB_OUTPUT"
37
+ - uses : docker/setup-buildx-action@v3
38
+ id : buildx
39
+ with :
40
+ install : true
41
+ - name : Build, tag, and push image to Amazon ECR
42
+ id : build-image
43
+ uses : docker/build-push-action@v6
44
+ with :
45
+ push : true
46
+ tags : ${{ steps.login-ecr.outputs.registry }}/theme-nextjs-bea:${{ steps.prep.outputs.BUILD_ID }}
47
+ secrets : |
48
+ "NEXT_PUBLIC_HCAPTCHA_SITEKEY=${{ secrets.NEXT_PUBLIC_HCAPTCHA_SITEKEY }}"
49
+ "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
50
+ "NEXT_PUBLIC_SENTRY_DSN=${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}"
51
51
build-preview :
52
52
name : Build preview docker image
53
53
runs-on : ubuntu-latest
0 commit comments