24 lines
764 B
YAML
24 lines
764 B
YAML
|
|
name: kaniko
|
||
|
|
|
||
|
|
on: push
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
deploy:
|
||
|
|
runs-on: ubuntu-rolling
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v3
|
||
|
|
- uses: docker/metadata-action@v4
|
||
|
|
id: metadata
|
||
|
|
with:
|
||
|
|
images: ${{ steps.ecr.outputs.registry }}/${{ github.repository }}
|
||
|
|
- uses: int128/kaniko-action@v1
|
||
|
|
id: build
|
||
|
|
with:
|
||
|
|
push: true
|
||
|
|
tags: ${{ steps.metadata.outputs.tags }}
|
||
|
|
labels: ${{ steps.metadata.outputs.labels }}
|
||
|
|
cache: true
|
||
|
|
cache-repository: ${{ steps.ecr.outputs.registry }}/${{ github.repository }}/cache
|
||
|
|
- run: kustomize edit set image myapp=${{ steps.ecr.outputs.registry }}/${{ github.repository }}@${{ steps.build.outputs.digest }}
|
||
|
|
- run: kustomize build | kubectl apply -f -
|