-
Notifications
You must be signed in to change notification settings - Fork 25
59 lines (47 loc) · 1.57 KB
/
build.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
58
59
name: Build dev images
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
AWS_REGION : us-east-1
permissions:
id-token: write
contents: read
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set buildx alias
run: docker buildx install
- name: Install docker pushrm
run: |
sudo wget https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_linux_amd64 -O /usr/libexec/docker/cli-plugins/docker-pushrm
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-pushrm
docker pushrm --help
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::904708148714:role/fondant-github-actions
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{env.AWS_REGION}}
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build components
run: ./scripts/build_components.sh --cache -t $GITHUB_SHA -t dev
- name: Build base image
run: ./scripts/build_base_image.sh -t dev