-
Notifications
You must be signed in to change notification settings - Fork 6
76 lines (70 loc) · 2.55 KB
/
ecrbuild-all.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Based on https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service
name: docker build to ECR
on:
workflow_call:
secrets:
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
inputs:
publish_to_ghcr:
type: boolean
default: false
outputs:
core-image:
description: "Core image SHA"
value: ${{ jobs.build-core.outputs.image-sha}}
base-image:
description: "Base image SHA"
value: ${{ jobs.build-base.outputs.image-sha }}
jobs-image:
description: "Jobs image SHA"
value: ${{ jobs.build-jobs.outputs.image-sha }}
jobs:
emit-sha-tag:
name: Emit container tag sha
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get image tag
id: label
run: |
sha_short=$(git describe --always --abbrev=40 --dirty)
echo "Building containers with tag:"
echo "$sha_short"
build-base:
uses: ./.github/workflows/ecrbuild-template.yml
with:
publish_to_ghcr: ${{ inputs.publish_to_ghcr }}
ghcr_image_name: platform-migrations
secrets:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
build-core:
uses: ./.github/workflows/ecrbuild-template.yml
# needs:
# - build-base
with:
package: core
publish_to_ghcr: ${{ inputs.publish_to_ghcr }}
ghcr_image_name: platform
# we require a bigger lad
# We are now public, default public runner is big enough
# runner: ubuntu-latest-m
secrets:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
build-jobs:
uses: ./.github/workflows/ecrbuild-template.yml
# needs:
# - build-base
with:
package: jobs
target: jobs
publish_to_ghcr: ${{ inputs.publish_to_ghcr }}
ghcr_image_name: platform-jobs
secrets:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}