-
Notifications
You must be signed in to change notification settings - Fork 16
38 lines (30 loc) · 1.06 KB
/
latest-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
name: Latest image build
on:
push:
branches: [ "main" ]
jobs:
latest-image-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: false
- name: Config env
run: |
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_AK }}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SK }}" >> $GITHUB_ENV
echo "AWS_DEFAULT_REGION=us-east-2" >> $GITHUB_ENV
- name: AWS CLI Init
uses: unfor19/install-aws-cli-action@v1
- name: Config ECR
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/cloudpilotai
- uses: ko-build/[email protected]
- name: build and publish image
run: |
export KO_DOCKER_REPO=public.ecr.aws/cloudpilotai/alibabacloud/karpenter
ko build --bare github.com/cloudpilot-ai/karpenter-provider-alibabacloud/cmd/controller