From d8644e1fa6b00c729ad1dc24db5ce497fb7bc617 Mon Sep 17 00:00:00 2001 From: Roger Sikorski Date: Sun, 12 Nov 2023 17:17:52 +0100 Subject: [PATCH] added build of ubuntu image --- .../workflows/{dev.yaml => dev_alpine.yaml} | 5 +-- .gitea/workflows/dev_ubuntu.yaml | 31 ++++++++++++++++++ .../workflows/{main.yaml => main_alpine.yaml} | 5 +-- .gitea/workflows/main_ubuntu.yaml | 32 +++++++++++++++++++ Dockerfile => dockerfile/alpine/Dockerfile | 0 dockerfile/ubuntu/Dockerfile | 9 ++++++ 6 files changed, 78 insertions(+), 4 deletions(-) rename .gitea/workflows/{dev.yaml => dev_alpine.yaml} (82%) create mode 100644 .gitea/workflows/dev_ubuntu.yaml rename .gitea/workflows/{main.yaml => main_alpine.yaml} (83%) create mode 100644 .gitea/workflows/main_ubuntu.yaml rename Dockerfile => dockerfile/alpine/Dockerfile (100%) create mode 100644 dockerfile/ubuntu/Dockerfile diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev_alpine.yaml similarity index 82% rename from .gitea/workflows/dev.yaml rename to .gitea/workflows/dev_alpine.yaml index 476e6c9..268169c 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev_alpine.yaml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v3 - uses: hadolint/hadolint-action@v3.1.0 with: - dockerfile: Dockerfile + dockerfile: dockerfile/alpine/Dockerfile build: runs-on: k3s @@ -24,7 +24,8 @@ jobs: with: image: rogersik/devops-helper registry: gitea.sikorski.cloud - tag: development + tag: dev-alpine cache: true username: rogersik password: ${{ secrets.REGISTRY_PASSWORD }} + build_file: dockerfile/alpine/Dockerfile diff --git a/.gitea/workflows/dev_ubuntu.yaml b/.gitea/workflows/dev_ubuntu.yaml new file mode 100644 index 0000000..629a328 --- /dev/null +++ b/.gitea/workflows/dev_ubuntu.yaml @@ -0,0 +1,31 @@ +name: build + +on: + push: + branches-ignore: + - main + +jobs: + Dockerfile lint: + runs-on: k3s + steps: + - uses: actions/checkout@v3 + - uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: dockerfile/ubuntu/Dockerfile + + build: + runs-on: k3s + # needs: Dockerfile lint # lets process faster pull-requests + steps: + - uses: actions/checkout@v3 + - name: Kaniko build + uses: aevea/action-kaniko@master + with: + image: rogersik/devops-helper + registry: gitea.sikorski.cloud + tag: dev-ubuntu + cache: true + username: rogersik + password: ${{ secrets.REGISTRY_PASSWORD }} + build_file: dockerfile/ubuntu/Dockerfile diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main_alpine.yaml similarity index 83% rename from .gitea/workflows/main.yaml rename to .gitea/workflows/main_alpine.yaml index e8ca6f3..bbccadd 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main_alpine.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: hadolint/hadolint-action@v3.1.0 with: - dockerfile: Dockerfile + dockerfile: Dockerfile/alpine/ build: runs-on: k3s @@ -25,7 +25,8 @@ jobs: with: image: rogersik/devops-helper registry: gitea.sikorski.cloud - tag: latest + tag: latest-alpine cache: true username: rogersik password: ${{ secrets.REGISTRY_PASSWORD }} + build_file: dockerfile/aline/Dockerfile diff --git a/.gitea/workflows/main_ubuntu.yaml b/.gitea/workflows/main_ubuntu.yaml new file mode 100644 index 0000000..12a9c72 --- /dev/null +++ b/.gitea/workflows/main_ubuntu.yaml @@ -0,0 +1,32 @@ +name: build +on: + push: + branches: + - main + schedule: + - cron: "0 6 * * SUN" + +jobs: + Dockerfile lint: + runs-on: k3s + steps: + - uses: actions/checkout@v3 + - uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: Dockerfile/ubuntu/ + + build: + runs-on: k3s + needs: Dockerfile lint + steps: + - uses: actions/checkout@v3 + - name: Kaniko build + uses: aevea/action-kaniko@master + with: + image: rogersik/devops-helper + registry: gitea.sikorski.cloud + tag: latest-ubuntu + cache: true + username: rogersik + password: ${{ secrets.REGISTRY_PASSWORD }} + build_file: dockerfile/aline/Dockerfile diff --git a/Dockerfile b/dockerfile/alpine/Dockerfile similarity index 100% rename from Dockerfile rename to dockerfile/alpine/Dockerfile diff --git a/dockerfile/ubuntu/Dockerfile b/dockerfile/ubuntu/Dockerfile new file mode 100644 index 0000000..c71fed1 --- /dev/null +++ b/dockerfile/ubuntu/Dockerfile @@ -0,0 +1,9 @@ +# https://hub.docker.com/_/alpine + +FROM ubuntu:22.04 + +RUN apt update && \ + apt install -y nano mc micro rsync ncdu git curl +COPY ./bin/ /usr/local/bin + +ENTRYPOINT ["sleep", "infinity"]