From becffc8cbdfe8ea936849f16bfe4bc856d4d0007 Mon Sep 17 00:00:00 2001 From: Julius Zeidler Date: Wed, 2 Apr 2025 18:46:53 +0200 Subject: [PATCH] publish step --- .forgejo/workflows/kaniko.yaml | 23 +++++++++++++++++++++++ Dockerfile-ubuntu | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/kaniko.yaml diff --git a/.forgejo/workflows/kaniko.yaml b/.forgejo/workflows/kaniko.yaml new file mode 100644 index 0000000..8948a29 --- /dev/null +++ b/.forgejo/workflows/kaniko.yaml @@ -0,0 +1,23 @@ +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 - diff --git a/Dockerfile-ubuntu b/Dockerfile-ubuntu index 72201b8..443e3bd 100644 --- a/Dockerfile-ubuntu +++ b/Dockerfile-ubuntu @@ -1,5 +1,5 @@ FROM ubuntu RUN apt-get -y update && \ - apt-get install -y curl jq bash git zsh + apt-get install -y curl jq bash git zsh docker CMD [ "zsh" ]