-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 1.22 KB
/
on-demand-build-images.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
name: On demand Docker Image Build
on:
workflow_dispatch:
inputs:
tag_name:
required: true
description: "Tag name will be prefaced with 'on-demand-'."
env:
IMAGE_REPO: public.ecr.aws/r5b3e0r5/3box
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to Public ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: us-east-1
- name: Set Final Tag
run: echo "TAG=on-demand-${{ inputs.tag_name }}" >> "$GITHUB_ENV"
- name: Build Docker runner Image
run: |
docker buildx build --load -t $IMAGE_REPO/keramik-runner:$TAG --target runner .
docker push $IMAGE_REPO/keramik-runner:$TAG
- name: Build Docker operator Image
run: |
docker buildx build --load -t $IMAGE_REPO/keramik-operator:$TAG --target operator .
docker push $IMAGE_REPO/keramik-operator:$TAG
- name: Print Image names
run: |
echo $IMAGE_REPO/keramik-runner:$TAG
echo $IMAGE_REPO/keramik-operator:$TAG